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/source/propctrlr/formcomponenthandler.cxx | |
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/source/propctrlr/formcomponenthandler.cxx')
-rw-r--r-- | extensions/source/propctrlr/formcomponenthandler.cxx | 116 |
1 files changed, 79 insertions, 37 deletions
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 ); |