summaryrefslogtreecommitdiffstats
path: root/forms/source/component/Grid.cxx
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2008-12-16 13:30:53 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2008-12-16 13:30:53 +0000
commit4d25bb492c1a82be70808b7f66296abf8923b226 (patch)
treee6f5f779ba0ac68e2085ecc2611afc168d6220a4 /forms/source/component/Grid.cxx
parentCWS-TOOLING: integrate CWS native209_DEV300 (diff)
downloadcore-4d25bb492c1a82be70808b7f66296abf8923b226.tar.gz
core-4d25bb492c1a82be70808b7f66296abf8923b226.zip
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 'forms/source/component/Grid.cxx')
-rw-r--r--forms/source/component/Grid.cxx69
1 files changed, 46 insertions, 23 deletions
diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx
index 1c0d61b907ac..270fa2c9547e 100644
--- a/forms/source/component/Grid.cxx
+++ b/forms/source/component/Grid.cxx
@@ -31,26 +31,26 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_forms.hxx"
-#include "Grid.hxx"
#include "Columns.hxx"
#include "findpos.hxx"
+#include "Grid.hxx"
+#include "property.hrc"
+#include "property.hxx"
+#include "services.hxx"
+
+/** === begin UNO includes === **/
#include <com/sun/star/form/FormComponentType.hpp>
#include <com/sun/star/form/XForm.hpp>
#include <com/sun/star/form/XLoadable.hpp>
-#include "services.hxx"
-#ifndef _FRM_PROPERTY_HRC_
-#include "property.hrc"
-#endif
-#include "property.hxx"
-#include <cppuhelper/queryinterface.hxx>
-#include <comphelper/extract.hxx>
-#include <comphelper/container.hxx>
-#include <comphelper/basicio.hxx>
-#include <vcl/svapp.hxx>
+#include <com/sun/star/text/WritingMode2.hpp>
+/** === end UNO includes === **/
-#ifndef _TOOLKIT_UNOHLP_HXX
+#include <comphelper/basicio.hxx>
+#include <comphelper/container.hxx>
+#include <comphelper/extract.hxx>
+#include <cppuhelper/queryinterface.hxx>
#include <toolkit/helper/vclunohelper.hxx>
-#endif
+#include <vcl/svapp.hxx>
using namespace ::com::sun::star::uno;
@@ -72,6 +72,8 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::util;
using namespace ::com::sun::star::view;
+namespace WritingMode2 = ::com::sun::star::text::WritingMode2;
+
const sal_uInt16 ROWHEIGHT = 0x0001;
const sal_uInt16 FONTTYPE = 0x0002;
const sal_uInt16 FONTSIZE = 0x0004;
@@ -99,6 +101,8 @@ OGridControlModel::OGridControlModel(const Reference<XMultiServiceFactory>& _rxF
,m_aResetListeners(m_aMutex)
,m_aDefaultControl( FRM_SUN_CONTROL_GRIDCONTROL )
,m_nBorder(1)
+ ,m_nWritingMode( WritingMode2::CONTEXT )
+ ,m_nContextWritingMode( WritingMode2::CONTEXT )
,m_bEnable(sal_True)
,m_bNavigation(sal_True)
,m_bRecordMarker(sal_True)
@@ -126,6 +130,8 @@ OGridControlModel::OGridControlModel( const OGridControlModel* _pOriginal, const
m_bEnable = _pOriginal->m_bEnable;
m_bNavigation = _pOriginal->m_bNavigation;
m_nBorder = _pOriginal->m_nBorder;
+ m_nWritingMode = _pOriginal->m_nWritingMode;
+ m_nContextWritingMode = _pOriginal->m_nContextWritingMode;
m_bRecordMarker = _pOriginal->m_bRecordMarker;
m_bPrintable = _pOriginal->m_bPrintable;
m_bAlwaysShowCursor = _pOriginal->m_bAlwaysShowCursor;
@@ -409,7 +415,7 @@ void OGridControlModel::_reset()
//------------------------------------------------------------------------------
void OGridControlModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
- BEGIN_DESCRIBE_BASE_PROPERTIES( 34 )
+ BEGIN_DESCRIBE_BASE_PROPERTIES( 36 )
DECL_PROP1(NAME, ::rtl::OUString, BOUND);
DECL_PROP2(CLASSID, sal_Int16, READONLY, TRANSIENT);
DECL_PROP1(TAG, ::rtl::OUString, BOUND);
@@ -444,6 +450,8 @@ void OGridControlModel::describeFixedProperties( Sequence< Property >& _rProps )
DECL_PROP3(ALWAYSSHOWCURSOR, sal_Bool, BOUND, MAYBEDEFAULT, TRANSIENT);
DECL_PROP3(DISPLAYSYNCHRON, sal_Bool, BOUND, MAYBEDEFAULT, TRANSIENT);
DECL_PROP2(HELPURL, ::rtl::OUString, BOUND, MAYBEDEFAULT);
+ DECL_PROP2(WRITING_MODE, sal_Int16, BOUND, MAYBEDEFAULT);
+ DECL_PROP3(CONTEXT_WRITING_MODE,sal_Int16, BOUND, MAYBEDEFAULT, TRANSIENT);
END_DESCRIBE_PROPERTIES();
}
@@ -452,6 +460,12 @@ void OGridControlModel::getFastPropertyValue(Any& rValue, sal_Int32 nHandle ) co
{
switch (nHandle)
{
+ case PROPERTY_ID_CONTEXT_WRITING_MODE:
+ rValue <<= m_nContextWritingMode;
+ break;
+ case PROPERTY_ID_WRITING_MODE:
+ rValue <<= m_nWritingMode;
+ break;
case PROPERTY_ID_HELPTEXT:
rValue <<= m_sHelpText;
break;
@@ -513,6 +527,12 @@ sal_Bool OGridControlModel::convertFastPropertyValue( Any& rConvertedValue, Any&
sal_Bool bModified(sal_False);
switch (nHandle)
{
+ case PROPERTY_ID_CONTEXT_WRITING_MODE:
+ bModified = tryPropertyValue( rConvertedValue, rOldValue, rValue, m_nContextWritingMode );
+ break;
+ case PROPERTY_ID_WRITING_MODE:
+ bModified = tryPropertyValue( rConvertedValue, rOldValue, rValue, m_nWritingMode );
+ break;
case PROPERTY_ID_HELPTEXT:
bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_sHelpText);
break;
@@ -592,6 +612,12 @@ void OGridControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, con
{
switch (nHandle)
{
+ case PROPERTY_ID_CONTEXT_WRITING_MODE:
+ rValue >>= m_nContextWritingMode;
+ break;
+ case PROPERTY_ID_WRITING_MODE:
+ rValue >>= m_nWritingMode;
+ break;
case PROPERTY_ID_HELPTEXT:
rValue >>= m_sHelpText;
break;
@@ -662,6 +688,11 @@ Any OGridControlModel::getPropertyDefaultByHandle( sal_Int32 nHandle ) const
Any aReturn;
switch (nHandle)
{
+ case PROPERTY_ID_CONTEXT_WRITING_MODE:
+ case PROPERTY_ID_WRITING_MODE:
+ aReturn <<= WritingMode2::CONTEXT;
+ break;
+
case PROPERTY_ID_DEFAULTCONTROL:
aReturn <<= ::rtl::OUString( STARDIV_ONE_FORM_CONTROL_GRID );
break;
@@ -956,15 +987,7 @@ void OGridControlModel::write(const Reference<XObjectOutputStream>& _rxOutStream
_rxOutStream->writeShort( aFont.Pitch );
}
- // no need to write a compatible service name anymore: Since the binfilter workspace, this
- // code here is not used anymore for writing old binary file formats. Thus, there's no need
- // to be compatible to anything except ourself.
- // 2004-07-26 - #i31138# - fs@openoffice.org
-// if ( m_aDefaultControl == FRM_SUN_CONTROL_GRIDCONTROL )
-// // for compatibility, write a sevice name which older versions understand (up to 5.1)
-// _rxOutStream << STARDIV_ONE_FORM_CONTROL_GRID;
-// else
- _rxOutStream << m_aDefaultControl;
+ _rxOutStream << m_aDefaultControl;
_rxOutStream->writeShort(m_nBorder);
_rxOutStream->writeBoolean(m_bEnable);