diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-03-27 01:35:21 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-03-27 01:38:43 +0200 |
commit | b54480ea7882df03b5d69b43ff080db72da14835 (patch) | |
tree | 970beea9f2dfb33b404687f18ccf0edc2276b94b | |
parent | 69a9cffb9e6285a8735e4b35cdea9db4b118063c (diff) |
No need for two sets of names for the same exttextinput flag bits
Change-Id: Ic5756d75bc86795a7add95694aef6fc9d1f6b9fa
-rw-r--r-- | vcl/aqua/source/window/salframeview.mm | 8 | ||||
-rw-r--r-- | vcl/inc/salwtype.hxx | 20 | ||||
-rw-r--r-- | vcl/unx/generic/app/i18n_cb.cxx | 15 | ||||
-rw-r--r-- | vcl/unx/generic/window/salframe.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/gtk/window/gtkframe.cxx | 8 | ||||
-rw-r--r-- | vcl/win/source/window/salframe.cxx | 16 |
6 files changed, 28 insertions, 45 deletions
diff --git a/vcl/aqua/source/window/salframeview.mm b/vcl/aqua/source/window/salframeview.mm index aea29a43d5de..e05156e59859 100644 --- a/vcl/aqua/source/window/salframeview.mm +++ b/vcl/aqua/source/window/salframeview.mm @@ -1539,16 +1539,16 @@ private: switch (nUnderlineValue & 0xff) { case NSUnderlineStyleSingle: - aInputFlags[i] = SAL_EXTTEXTINPUT_ATTR_UNDERLINE; + aInputFlags[i] = EXTTEXTINPUT_ATTR_UNDERLINE; break; case NSUnderlineStyleThick: - aInputFlags[i] = SAL_EXTTEXTINPUT_ATTR_UNDERLINE | SAL_EXTTEXTINPUT_ATTR_HIGHLIGHT; + aInputFlags[i] = EXTTEXTINPUT_ATTR_UNDERLINE | EXTTEXTINPUT_ATTR_HIGHLIGHT; break; case NSUnderlineStyleDouble: - aInputFlags[i] = SAL_EXTTEXTINPUT_ATTR_BOLDUNDERLINE; + aInputFlags[i] = EXTTEXTINPUT_ATTR_BOLDUNDERLINE; break; default: - aInputFlags[i] = SAL_EXTTEXTINPUT_ATTR_HIGHLIGHT; + aInputFlags[i] = EXTTEXTINPUT_ATTR_HIGHLIGHT; break; } } diff --git a/vcl/inc/salwtype.hxx b/vcl/inc/salwtype.hxx index 69e63412eca4..c9a7e19452e4 100644 --- a/vcl/inc/salwtype.hxx +++ b/vcl/inc/salwtype.hxx @@ -31,24 +31,6 @@ class Window; class FontSelectPattern; -// --------------- -// - SalExtInput - -// --------------- - -// Have to match DEFINEs in cmdevt.hxx, as these will not be converted - -#define SAL_EXTTEXTINPUT_ATTR_GRAYWAVELINE ((sal_uInt16)0x0100) -#define SAL_EXTTEXTINPUT_ATTR_UNDERLINE ((sal_uInt16)0x0200) -#define SAL_EXTTEXTINPUT_ATTR_BOLDUNDERLINE ((sal_uInt16)0x0400) -#define SAL_EXTTEXTINPUT_ATTR_DOTTEDUNDERLINE ((sal_uInt16)0x0800) -#define SAL_EXTTEXTINPUT_ATTR_DASHDOTUNDERLINE ((sal_uInt16)0x1000) -#define SAL_EXTTEXTINPUT_ATTR_HIGHLIGHT ((sal_uInt16)0x2000) -#define SAL_EXTTEXTINPUT_ATTR_REDTEXT ((sal_uInt16)0x4000) -#define SAL_EXTTEXTINPUT_ATTR_HALFTONETEXT ((sal_uInt16)0x8000) - -#define SAL_EXTTEXTINPUT_CURSOR_INVISIBLE ((sal_uInt16)0x0001) -#define SAL_EXTTEXTINPUT_CURSOR_OVERWRITE ((sal_uInt16)0x0002) - // ------------ // - SalEvent - // ------------ @@ -195,7 +177,7 @@ struct SalExtTextInputEvent const sal_uInt16* mpTextAttr; // Text-Attribute sal_uLong mnCursorPos; // Cursor-Position sal_uLong mnDeltaStart; // Start-Position of last change - sal_uInt8 mnCursorFlags; // SAL_EXTTEXTINPUT_CURSOR_xxx + sal_uInt8 mnCursorFlags; // EXTTEXTINPUT_CURSOR_xxx sal_Bool mbOnlyCursor; // sal_True: Only Cursor-Position has been changed }; diff --git a/vcl/unx/generic/app/i18n_cb.cxx b/vcl/unx/generic/app/i18n_cb.cxx index 0e3f54bf6c21..7ff60cb3ed83 100644 --- a/vcl/unx/generic/app/i18n_cb.cxx +++ b/vcl/unx/generic/app/i18n_cb.cxx @@ -29,6 +29,7 @@ #include <X11/Xlib.h> #include <tools/postx.h> +#include "vcl/cmdevt.hxx" #include "unx/salunx.h" #include "unx/XIM.h" #include "unx/i18n_cb.hxx" @@ -262,7 +263,7 @@ Preedit_UpdateAttributes ( preedit_text_t* ptext, XIMFeedback* feedback, } // Convert the XIM feedback values into appropriate VCL -// SAL_EXTTEXTINPUT_ATTR values +// EXTTEXTINPUT_ATTR values // returns an allocate list of attributes, which must be freed by caller sal_uInt16* Preedit_FeedbackToSAL ( XIMFeedback* pfeedback, int nlength, std::vector<sal_uInt16>& rSalAttr ) @@ -295,17 +296,17 @@ Preedit_FeedbackToSAL ( XIMFeedback* pfeedback, int nlength, std::vector<sal_uIn else { if (nfeedback & XIMReverse) - nval |= SAL_EXTTEXTINPUT_ATTR_HIGHLIGHT; + nval |= EXTTEXTINPUT_ATTR_HIGHLIGHT; if (nfeedback & XIMUnderline) - nval |= SAL_EXTTEXTINPUT_ATTR_UNDERLINE; + nval |= EXTTEXTINPUT_ATTR_UNDERLINE; if (nfeedback & XIMHighlight) - nval |= SAL_EXTTEXTINPUT_ATTR_HIGHLIGHT; + nval |= EXTTEXTINPUT_ATTR_HIGHLIGHT; if (nfeedback & XIMPrimary) - nval |= SAL_EXTTEXTINPUT_ATTR_DOTTEDUNDERLINE; + nval |= EXTTEXTINPUT_ATTR_DOTTEDUNDERLINE; if (nfeedback & XIMSecondary) - nval |= SAL_EXTTEXTINPUT_ATTR_DASHDOTUNDERLINE; + nval |= EXTTEXTINPUT_ATTR_DASHDOTUNDERLINE; if (nfeedback & XIMTertiary) // same as 2ery - nval |= SAL_EXTTEXTINPUT_ATTR_DASHDOTUNDERLINE; + nval |= EXTTEXTINPUT_ATTR_DASHDOTUNDERLINE; } // copy in list diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index 5ce10795b464..d614dd5728e9 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -2886,7 +2886,7 @@ void X11SalFrame::beginUnicodeSequence() if( ! aDeleteWatch.isDeleted() ) { - sal_uInt16 nTextAttr = SAL_EXTTEXTINPUT_ATTR_UNDERLINE; + sal_uInt16 nTextAttr = EXTTEXTINPUT_ATTR_UNDERLINE; SalExtTextInputEvent aEv; aEv.mnTime = 0; aEv.maText = rSeq; @@ -2915,7 +2915,7 @@ bool X11SalFrame::appendUnicodeSequence( sal_Unicode c ) aBuf.append( rSeq ); aBuf.append( c ); rSeq = aBuf.makeStringAndClear(); - std::vector<sal_uInt16> attribs( rSeq.getLength(), SAL_EXTTEXTINPUT_ATTR_UNDERLINE ); + std::vector<sal_uInt16> attribs( rSeq.getLength(), EXTTEXTINPUT_ATTR_UNDERLINE ); SalExtTextInputEvent aEv; aEv.mnTime = 0; @@ -2949,7 +2949,7 @@ bool X11SalFrame::endUnicodeSequence() sal_Int32 nValue = aNumbers.toInt32( 16 ); if( nValue >= 32 ) { - sal_uInt16 nTextAttr = SAL_EXTTEXTINPUT_ATTR_UNDERLINE; + sal_uInt16 nTextAttr = EXTTEXTINPUT_ATTR_UNDERLINE; SalExtTextInputEvent aEv; aEv.mnTime = 0; aEv.maText = rtl::OUString( sal_Unicode(nValue) ); diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx index 7a042e9b1388..63df5260cfe4 100644 --- a/vcl/unx/gtk/window/gtkframe.cxx +++ b/vcl/unx/gtk/window/gtkframe.cxx @@ -4073,13 +4073,13 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_ switch (pango_attr->klass->type) { case PANGO_ATTR_BACKGROUND: - sal_attr |= (SAL_EXTTEXTINPUT_ATTR_HIGHLIGHT | SAL_EXTTEXTINPUT_CURSOR_INVISIBLE); + sal_attr |= (EXTTEXTINPUT_ATTR_HIGHLIGHT | EXTTEXTINPUT_CURSOR_INVISIBLE); break; case PANGO_ATTR_UNDERLINE: - sal_attr |= SAL_EXTTEXTINPUT_ATTR_UNDERLINE; + sal_attr |= EXTTEXTINPUT_ATTR_UNDERLINE; break; case PANGO_ATTR_STRIKETHROUGH: - sal_attr |= SAL_EXTTEXTINPUT_ATTR_REDTEXT; + sal_attr |= EXTTEXTINPUT_ATTR_REDTEXT; break; default: break; @@ -4088,7 +4088,7 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_ tmp_list = tmp_list->next; } if (sal_attr == 0) - sal_attr |= SAL_EXTTEXTINPUT_ATTR_UNDERLINE; + sal_attr |= EXTTEXTINPUT_ATTR_UNDERLINE; g_slist_free (attr_list); // Set the sal attributes on our text diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx index 5dd5d75b8b73..5951b15f3690 100644 --- a/vcl/win/source/window/salframe.cxx +++ b/vcl/win/source/window/salframe.cxx @@ -5206,17 +5206,17 @@ static sal_Bool ImplHandleIMECompositionInput( WinSalFrame* pFrame, sal_uInt16 nSalAttr; if ( nWinAttr == ATTR_TARGET_CONVERTED ) { - nSalAttr = SAL_EXTTEXTINPUT_ATTR_BOLDUNDERLINE; - aEvt.mnCursorFlags |= SAL_EXTTEXTINPUT_CURSOR_INVISIBLE; + nSalAttr = EXTTEXTINPUT_ATTR_BOLDUNDERLINE; + aEvt.mnCursorFlags |= EXTTEXTINPUT_CURSOR_INVISIBLE; } else if ( nWinAttr == ATTR_CONVERTED ) - nSalAttr = SAL_EXTTEXTINPUT_ATTR_DASHDOTUNDERLINE; + nSalAttr = EXTTEXTINPUT_ATTR_DASHDOTUNDERLINE; else if ( nWinAttr == ATTR_TARGET_NOTCONVERTED ) - nSalAttr = SAL_EXTTEXTINPUT_ATTR_HIGHLIGHT; + nSalAttr = EXTTEXTINPUT_ATTR_HIGHLIGHT; else if ( nWinAttr == ATTR_INPUT_ERROR ) - nSalAttr = SAL_EXTTEXTINPUT_ATTR_REDTEXT | SAL_EXTTEXTINPUT_ATTR_DOTTEDUNDERLINE; + nSalAttr = EXTTEXTINPUT_ATTR_REDTEXT | EXTTEXTINPUT_ATTR_DOTTEDUNDERLINE; else /* ( nWinAttr == ATTR_INPUT ) */ - nSalAttr = SAL_EXTTEXTINPUT_ATTR_DOTTEDUNDERLINE; + nSalAttr = EXTTEXTINPUT_ATTR_DOTTEDUNDERLINE; pSalAttrAry[i] = nSalAttr; } @@ -5248,9 +5248,9 @@ static sal_Bool ImplHandleIMECompositionInput( WinSalFrame* pFrame, aEvt.mnCursorPos = LOWORD( ImmGetCompositionStringW( hIMC, GCS_CURSORPOS, 0, 0 ) ); if ( pFrame->mbCandidateMode ) - aEvt.mnCursorFlags |= SAL_EXTTEXTINPUT_CURSOR_INVISIBLE; + aEvt.mnCursorFlags |= EXTTEXTINPUT_CURSOR_INVISIBLE; if ( lParam & CS_NOMOVECARET ) - aEvt.mnCursorFlags |= SAL_EXTTEXTINPUT_CURSOR_OVERWRITE; + aEvt.mnCursorFlags |= EXTTEXTINPUT_CURSOR_OVERWRITE; pFrame->CallCallback( SALEVENT_EXTTEXTINPUT, (void*)&aEvt ); } |