diff options
author | Rüdiger Timm <rt@openoffice.org> | 2008-12-16 13:30:53 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2008-12-16 13:30:53 +0000 |
commit | 4d25bb492c1a82be70808b7f66296abf8923b226 (patch) | |
tree | e6f5f779ba0ac68e2085ecc2611afc168d6220a4 /extensions | |
parent | 53c54b688dcd1594c2275ca591935019ba84d398 (diff) |
CWS-TOOLING: integrate CWS rtlcontrols
2008-12-11 21:08:49 +0100 fs r265367 : CONTEXT_WRITING_MODE is transient
2008-12-11 21:08:00 +0100 fs r265365 : REGISTER_PROP_3
2008-12-11 20:53:44 +0100 fs r265362 : ContextWritingMode is not MAYBEVOID
2008-12-11 15:29:08 +0100 fs r265315 : prevent a deadlock during complex.dbaccess.DatabaseDocument test
2008-12-11 15:01:13 +0100 fs r265304 : manual RESYNC to m37
2008-12-10 20:04:38 +0100 pl r265230 : #i30631# fix a snafu in mirroring
2008-12-10 19:14:45 +0100 pl r265229 : #i30631# rework PaintToDevice for RTL controls
2008-12-05 10:19:13 +0100 fs r264893 : #i10000# ImplInitSettings => ImplInitWindow (ImplInitSettings clashed with base classes ImplInitSettings on unxsols4)
2008-12-03 12:55:24 +0100 fs r264768 : #i100000#
2008-12-03 07:11:48 +0100 fs r264741 : #i10000#
2008-12-02 10:37:51 +0100 fs r264670 : CWS-TOOLING: rebase CWS rtlcontrols to trunk@264325 (milestone: DEV300:m36)
2008-12-02 09:27:50 +0100 fs r264660 : merge from trunk
2008-11-25 10:28:36 +0100 ama r264277 : Fix #i94572#
2008-11-24 11:46:48 +0100 fs r264218 : #i30631# proper context writing mode
2008-11-24 09:38:04 +0100 fs r264204 : #i30631# (approved by PL)
2008-11-24 09:35:47 +0100 fs r264203 : #i30631# Context/WritingMode
2008-11-24 09:33:36 +0100 fs r264202 : #i30631# Context/WritingMode
2008-11-24 09:31:53 +0100 fs r264200 : #i30631# RTL
2008-11-19 08:51:48 +0100 fs r263963 : #i10000#
2008-11-18 20:58:11 +0100 fs r263878 : #i10000#
2008-11-18 15:30:44 +0100 fs r263778 : migrate the CWS from CVS to SVN
the CVS changes contained in this change set are the ones between the
following two CVS tags:
CWS_DEV300_RTLCONTROLS_ANCHOR
CWS_DEV300_RTLCONTROLS_PRE_MIGRATION
2008-11-18 12:29:04 +0100 ama r263762 : Fix #i94572#: Context direction for drawing objects
2008-11-18 12:25:50 +0100 ama r263761 : Fix #i94572#: Context direction for drawing objects
2008-11-18 12:02:30 +0100 ama r263759 : Fix #i94572#: Context direction for drawing objects
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/inc/extensio.hrc | 5 | ||||
-rw-r--r-- | extensions/source/propctrlr/controltype.hxx | 2 | ||||
-rw-r--r-- | extensions/source/propctrlr/formcomponenthandler.cxx | 116 | ||||
-rw-r--r-- | extensions/source/propctrlr/formmetadata.cxx | 4 | ||||
-rw-r--r-- | extensions/source/propctrlr/formmetadata.hxx | 1 | ||||
-rw-r--r-- | extensions/source/propctrlr/formres.src | 21 | ||||
-rw-r--r-- | extensions/source/propctrlr/formresid.hrc | 3 | ||||
-rw-r--r-- | extensions/source/propctrlr/formstrings.hxx | 1 | ||||
-rw-r--r-- | extensions/util/hidother.src | 1 |
9 files changed, 114 insertions, 40 deletions
diff --git a/extensions/inc/extensio.hrc b/extensions/inc/extensio.hrc index 96b8a6b08a5b..a831143b5eeb 100644 --- a/extensions/inc/extensio.hrc +++ b/extensions/inc/extensio.hrc @@ -456,10 +456,11 @@ #define HID_PROP_BORDERCOLOR (HID_FORMS_START + 337) #define UID_PROP_DLG_BORDERCOLOR (HID_FORMS_START + 338) #define HID_PROP_IMAGEPOSITION (HID_FORMS_START + 339) -#define HID_PROP_NOLABEL (HID_FORMS_START + 340) +#define HID_PROP_NOLABEL (HID_FORMS_START + 340) +#define HID_PROP_WRITING_MODE (HID_FORMS_START + 341) // please adjust HID_LAST_FORMS_ID if you add new ids here! -#define HID_LAST_FORMS_ID HID_PROP_NOLABEL +#define HID_LAST_FORMS_ID HID_PROP_WRITING_MODE #if HID_LAST_FORMS_ID > HID_FORMS_END #error id overflow diff --git a/extensions/source/propctrlr/controltype.hxx b/extensions/source/propctrlr/controltype.hxx index 1afcfd3ab5fc..4cde8d2c3e9d 100644 --- a/extensions/source/propctrlr/controltype.hxx +++ b/extensions/source/propctrlr/controltype.hxx @@ -30,6 +30,8 @@ #ifndef EXTENSIONS_SOURCE_PROPCTRLR_CONTROLTYPE_HXX #define EXTENSIONS_SOURCE_PROPCTRLR_CONTROLTYPE_HXX +#include <sal/types.h> + //........................................................................ namespace pcr { diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index 11f464a8fde4..c413de6e7e44 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -30,24 +30,21 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_extensions.hxx" + +#include "controltype.hxx" +#include "extensio.hrc" +#include "fontdialog.hxx" #include "formcomponenthandler.hxx" +#include "formlinkdialog.hxx" #include "formmetadata.hxx" -#include "usercontrol.hxx" -#ifndef EXTENSIONS_INC_EXTENSIO_HRC -#include "extensio.hrc" -#endif -#include "formstrings.hxx" -#ifndef _EXTENSIONS_FORMCTRLR_PROPRESID_HRC_ #include "formresid.hrc" -#endif -#include "controltype.hxx" +#include "formstrings.hxx" +#include "handlerhelper.hxx" #include "listselectiondlg.hxx" -#include "formlinkdialog.hxx" -#include "fontdialog.hxx" +#include "pcrcommon.hxx" #include "selectlabeldialog.hxx" #include "taborder.hxx" -#include "pcrcommon.hxx" -#include "handlerhelper.hxx" +#include "usercontrol.hxx" /** === begin UNO includes === **/ #include <com/sun/star/lang/NullPointerException.hpp> @@ -81,39 +78,35 @@ #include <com/sun/star/resource/XStringResourceManager.hpp> #include <com/sun/star/resource/MissingResourceException.hpp> #include <com/sun/star/graphic/GraphicObject.hpp> +#include <com/sun/star/text/WritingMode2.hpp> /** === end UNO includes === **/ -#include <connectivity/dbexception.hxx> -#include <vcl/wrkwin.hxx> -#include <svtools/numuno.hxx> -#include <unotools/confignode.hxx> + #include <comphelper/extract.hxx> -#ifndef SVTOOLS_FILENOTATION_HXX_ -#include <svtools/filenotation.hxx> -#endif -#include <toolkit/helper/vclunohelper.hxx> -#include <vcl/stdtext.hxx> -#include <svtools/itemset.hxx> -#include <svtools/numuno.hxx> +#include <connectivity/dbconversion.hxx> +#include <connectivity/dbexception.hxx> +#include <cppuhelper/exc_hlp.hxx> #include <sfx2/app.hxx> -#ifndef _SVX_SVXIDS_HRC -#include <svx/svxids.hrc> -#endif -#include <svtools/intitem.hxx> -#include <svx/numinf.hxx> -#include <svx/svxdlg.hxx> -#ifndef _SVX_DIALOGS_HRC -#include <svx/dialogs.hrc> -#endif -#include <vcl/msgbox.hxx> -#include <sfx2/filedlghelper.hxx> #include <sfx2/basedlgs.hxx> #include <sfx2/docfilt.hxx> +#include <sfx2/filedlghelper.hxx> +#include <svtools/ctloptions.hxx> #include <svtools/colrdlg.hxx> -#include <svtools/urihelper.hxx> +#include <svtools/filenotation.hxx> +#include <svtools/intitem.hxx> +#include <svtools/itemset.hxx> #include <svtools/moduleoptions.hxx> +#include <svtools/numuno.hxx> +#include <svtools/urihelper.hxx> +#include <svx/dialogs.hrc> +#include <svx/numinf.hxx> +#include <svx/svxdlg.hxx> +#include <svx/svxids.hrc> +#include <toolkit/helper/vclunohelper.hxx> #include <tools/diagnose_ex.h> -#include <cppuhelper/exc_hlp.hxx> -#include <connectivity/dbconversion.hxx> +#include <unotools/confignode.hxx> +#include <vcl/msgbox.hxx> +#include <vcl/stdtext.hxx> +#include <vcl/wrkwin.hxx> #include <tools/StringListResource.hxx> #include <limits> @@ -148,6 +141,8 @@ namespace pcr using namespace inspection; using namespace ::dbtools; + namespace WritingMode2 = ::com::sun::star::text::WritingMode2; + //==================================================================== //= FormComponentPropertyHandler //==================================================================== @@ -607,6 +602,28 @@ namespace pcr } break; + case PROPERTY_ID_WRITING_MODE: + { + aPropertyValue = FormComponentPropertyHandler_Base::convertToPropertyValue( _rPropertyName, _rControlValue ); + + sal_Int16 nNormalizedValue( 2 ); + OSL_VERIFY( aPropertyValue >>= nNormalizedValue ); + sal_Int16 nWritingMode = WritingMode2::CONTEXT; + switch ( nNormalizedValue ) + { + case 0: nWritingMode = WritingMode2::LR_TB; break; + case 1: nWritingMode = WritingMode2::RL_TB; break; + case 2: nWritingMode = WritingMode2::CONTEXT; break; + default: + OSL_ENSURE( false, "FormComponentPropertyHandler::convertToControlValue: unexpected 'normalized value' for WritingMode!" ); + nWritingMode = WritingMode2::CONTEXT; + break; + } + + aPropertyValue <<= nWritingMode; + } + break; + default: aPropertyValue = FormComponentPropertyHandler_Base::convertToPropertyValue( _rPropertyName, _rControlValue ); break; // default @@ -716,6 +733,26 @@ namespace pcr } break; + case PROPERTY_ID_WRITING_MODE: + { + sal_Int16 nWritingMode( WritingMode2::CONTEXT ); + OSL_VERIFY( _rPropertyValue >>= nWritingMode ); + sal_Int16 nNormalized = 2; + switch ( nWritingMode ) + { + case WritingMode2::LR_TB: nNormalized = 0; break; + case WritingMode2::RL_TB: nNormalized = 1; break; + case WritingMode2::CONTEXT: nNormalized = 2; break; + default: + OSL_ENSURE( false, "FormComponentPropertyHandler::convertToControlValue: unsupported API value for WritingMode!" ); + nNormalized = 2; + break; + } + + aControlValue = FormComponentPropertyHandler_Base::convertToControlValue( _rPropertyName, makeAny( nNormalized ), _rControlValueType ); + } + break; + default: aControlValue = FormComponentPropertyHandler_Base::convertToControlValue( _rPropertyName, _rPropertyValue, _rControlValueType ); break; @@ -2185,6 +2222,11 @@ namespace pcr // ScaleImage is superseded by ScaleMode return true; break; + + case PROPERTY_ID_WRITING_MODE: + if ( !SvtCTLOptions().IsCTLFontEnabled() ) + return true; + break; } sal_uInt32 nPropertyUIFlags = m_pInfoService->getPropertyUIFlags( _rProperty.Handle ); diff --git a/extensions/source/propctrlr/formmetadata.cxx b/extensions/source/propctrlr/formmetadata.cxx index ae452a566337..70ae992e7044 100644 --- a/extensions/source/propctrlr/formmetadata.cxx +++ b/extensions/source/propctrlr/formmetadata.cxx @@ -142,6 +142,7 @@ namespace pcr DEF_INFO_2( TITLE, TITLE, TITLE, FORM_VISIBLE, DIALOG_VISIBLE ), DEF_INFO_3( LABEL, LABEL, LABEL, FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ), DEF_INFO_2( CONTROLLABEL, LABELCONTROL, CONTROLLABEL, FORM_VISIBLE, COMPOSEABLE ), + DEF_INFO_3( WRITING_MODE, WRITING_MODE, WRITING_MODE, FORM_VISIBLE, ENUM, COMPOSEABLE ), DEF_INFO_2( TEXT, TEXT, TEXT, DIALOG_VISIBLE, COMPOSEABLE ), DEF_INFO_3( MAXTEXTLEN, MAXTEXTLEN, MAXTEXTLEN, FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ), DEF_INFO_3( EDITMASK, EDITMASK, EDITMASK, FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ), @@ -508,6 +509,9 @@ namespace pcr case PROPERTY_ID_SCALE_MODE: nStringItemsResId = RID_RSC_ENUM_SCALE_MODE; break; + case PROPERTY_ID_WRITING_MODE: + nStringItemsResId = RID_RSC_ENUM_WRITING_MODE; + break; default: OSL_ENSURE( sal_False, "OPropertyInfoService::getPropertyEnumRepresentations: unknown enum property!" ); break; diff --git a/extensions/source/propctrlr/formmetadata.hxx b/extensions/source/propctrlr/formmetadata.hxx index a86eac088c7f..b1b23153dbdb 100644 --- a/extensions/source/propctrlr/formmetadata.hxx +++ b/extensions/source/propctrlr/formmetadata.hxx @@ -339,6 +339,7 @@ namespace pcr #define PROPERTY_ID_NOLABEL 195 #define PROPERTY_ID_SCALE_MODE 196 #define PROPERTY_ID_INPUT_REQUIRED 197 + #define PROPERTY_ID_WRITING_MODE 198 //............................................................................ } // namespace pcr diff --git a/extensions/source/propctrlr/formres.src b/extensions/source/propctrlr/formres.src index c05934b60d65..3700667dd0e9 100644 --- a/extensions/source/propctrlr/formres.src +++ b/extensions/source/propctrlr/formres.src @@ -1409,3 +1409,24 @@ String RID_STR_INPUT_REQUIRED { Text [ en-US ] = "Input required"; }; + +String RID_STR_WRITING_MODE +{ + Text [ en-US ] = "Text direction"; +}; + +Resource RID_RSC_ENUM_WRITING_MODE +{ + String 1 + { + Text [ en-US ] = "Left-to-right"; + }; + String 2 + { + Text [ en-US ] = "Right-to-left"; + }; + String 3 + { + Text [ en-US ] = "Use superordinate object settings"; + }; +}; diff --git a/extensions/source/propctrlr/formresid.hrc b/extensions/source/propctrlr/formresid.hrc index 5dadc9d2fa36..5f7544458d13 100644 --- a/extensions/source/propctrlr/formresid.hrc +++ b/extensions/source/propctrlr/formresid.hrc @@ -236,7 +236,7 @@ #define RID_STR_SHOW_SCROLLBARS ( RID_FORMBROWSER_START + 205 ) #define RID_STR_QUERYDESIGN_TITLE ( RID_FORMBROWSER_START + 206 ) #define RID_STR_ICONSIZE ( RID_FORMBROWSER_START + 207 ) - // FREE +#define RID_STR_WRITING_MODE ( RID_FORMBROWSER_START + 208 ) #define RID_STR_SHOW_POSITION ( RID_FORMBROWSER_START + 209 ) #define RID_STR_SHOW_NAVIGATION ( RID_FORMBROWSER_START + 210 ) #define RID_STR_SHOW_RECORDACTIONS ( RID_FORMBROWSER_START + 211 ) @@ -339,6 +339,7 @@ #define RID_RSC_ENUM_SCALE_MODE ( RID_PROPCONTROLLER_START + 26 ) #define RID_RSC_ENUM_YESNO ( RID_PROPCONTROLLER_START + 27 ) #define RID_RSC_ENUM_SHOWHIDE ( RID_PROPCONTROLLER_START + 28 ) +#define RID_RSC_ENUM_WRITING_MODE ( RID_PROPCONTROLLER_START + 26 ) // ----------------------------------------------------------------------- // - ImageList - local ids diff --git a/extensions/source/propctrlr/formstrings.hxx b/extensions/source/propctrlr/formstrings.hxx index 23f677a658bc..0d77b45bb6cf 100644 --- a/extensions/source/propctrlr/formstrings.hxx +++ b/extensions/source/propctrlr/formstrings.hxx @@ -262,6 +262,7 @@ namespace pcr PCR_CONSTASCII_STRING( PROPERTY_SUBMISSION_ID, "SubmissionID" ); PCR_CONSTASCII_STRING( PROPERTY_BINDING_ID, "BindingID" ); PCR_CONSTASCII_STRING( PROPERTY_ID, "ID" ); + PCR_CONSTASCII_STRING( PROPERTY_WRITING_MODE, "WritingMode" ); PCR_CONSTASCII_STRING( PROPERTY_MODEL, "Model" ); diff --git a/extensions/util/hidother.src b/extensions/util/hidother.src index e2c56da5d130..0b82734c645d 100644 --- a/extensions/util/hidother.src +++ b/extensions/util/hidother.src @@ -307,3 +307,4 @@ hidspecial HID_CHECK_FOR_UPD_DESCRIPTION { HelpId = HID_CHECK_FOR_UPD_DES hidspecial HID_CHECK_FOR_UPD_CANCEL { HelpId = HID_CHECK_FOR_UPD_CANCEL; } hidspecial HID_PROP_NOLABEL { HelpId = HID_PROP_NOLABEL; } hidspecial HID_PROP_INPUT_REQUIRED { HelpId = HID_PROP_INPUT_REQUIRED; } +hidspecial HID_PROP_WRITING_MODE { HelpId = HID_PROP_WRITING_MODE; } |