summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2009-09-09 11:45:13 +0200
committerMathias Bauer <mba@openoffice.org>2009-09-09 11:45:13 +0200
commitf088879bac7cb8149b116eea22a51cfb54012b3c (patch)
tree7fe914382ccef332b3c7579ba6dc09eeb8b3657f /forms
parent78fe4e5d494327cd0d0ea21f1663b1722583629e (diff)
parentb4f7e9e44292d81c4645e790545461943fb003c6 (diff)
merge commit to DEV300_m57
Diffstat (limited to 'forms')
-rw-r--r--forms/qa/integration/forms/TestSkeleton.java50
-rw-r--r--forms/source/component/Columns.cxx1
-rw-r--r--forms/source/component/ComboBox.cxx2
-rw-r--r--forms/source/component/FormComponent.cxx21
-rw-r--r--forms/source/component/Grid.cxx15
-rw-r--r--forms/source/component/Grid.hxx33
-rw-r--r--forms/source/component/navigationbar.cxx4
-rw-r--r--forms/source/component/navigationbar.hxx1
-rw-r--r--forms/source/inc/frm_strings.hxx1
-rw-r--r--forms/source/inc/property.hrc2
-rw-r--r--forms/source/misc/property.cxx1
-rw-r--r--forms/source/richtext/richtextmodel.cxx4
-rw-r--r--forms/source/richtext/richtextmodel.hxx1
-rw-r--r--forms/util/makefile.mk2
14 files changed, 71 insertions, 67 deletions
diff --git a/forms/qa/integration/forms/TestSkeleton.java b/forms/qa/integration/forms/TestSkeleton.java
index f16083664cbe..8f2765b3a6d5 100644
--- a/forms/qa/integration/forms/TestSkeleton.java
+++ b/forms/qa/integration/forms/TestSkeleton.java
@@ -6,9 +6,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: TestSkeleton.java,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -29,61 +26,50 @@
************************************************************************/
package integration.forms;
-import com.sun.star.uno.UnoRuntime;
-
-import com.sun.star.lang.XMultiServiceFactory;
-
-import com.sun.star.util.XCloseable;
+import com.sun.star.uno.Exception;
-import integration.forms.DocumentHelper;
-
-public class TestSkeleton extends complexlib.ComplexTestCase
+public class TestSkeleton extends TestCase
{
- private DocumentHelper m_document;
- private FormLayer m_formLayer;
- private XMultiServiceFactory m_orb;
-
- /** Creates a new instance of ValueBinding */
+ /** Creates a new instance of TestSkeleton */
public TestSkeleton()
{
+ super( DocumentType.WRITER );
}
/* ------------------------------------------------------------------ */
public String[] getTestMethodNames()
{
return new String[] {
- "checkSomething"
+ "checkTestSkeleton"
};
}
/* ------------------------------------------------------------------ */
public String getTestObjectName()
{
- return "Form Control Spreadsheet Cell Binding Test";
+ return "Test Skeleton";
+ }
+
+ /* ------------------------------------------------------------------ */
+ public void checkTestSkeleton() throws com.sun.star.uno.Exception, java.lang.Exception
+ {
}
/* ------------------------------------------------------------------ */
- public void before() throws com.sun.star.uno.Exception, java.lang.Exception
+ public void before() throws Exception, java.lang.Exception
{
- m_orb = (XMultiServiceFactory)param.getMSF();
- m_document = DocumentHelper.blankTextDocument( m_orb );
- m_formLayer = new FormLayer( m_document );
+ super.before();
}
/* ------------------------------------------------------------------ */
- public void after() throws com.sun.star.uno.Exception, java.lang.Exception
+ public void after() throws Exception, java.lang.Exception
{
- // close our document
- if ( m_document != null )
- {
- XCloseable closeDoc = (XCloseable)UnoRuntime.queryInterface( XCloseable.class,
- m_document.getDocument() );
- closeDoc.close( true );
- }
+ super.before();
}
/* ------------------------------------------------------------------ */
- public void checkSomething() throws com.sun.star.uno.Exception, java.lang.Exception
+ protected void prepareDocument() throws com.sun.star.uno.Exception, java.lang.Exception
{
+ super.prepareDocument();
}
-}
+ }
diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx
index b9b2b6cb5936..c307783f179b 100644
--- a/forms/source/component/Columns.cxx
+++ b/forms/source/component/Columns.cxx
@@ -345,6 +345,7 @@ void OGridColumn::clearAggregateProperties( Sequence< Property >& _rProps, sal_B
aForbiddenProperties.insert( PROPERTY_VERTICALALIGN );
aForbiddenProperties.insert( PROPERTY_IMAGE_URL );
aForbiddenProperties.insert( PROPERTY_IMAGE_POSITION );
+ aForbiddenProperties.insert( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "EnableVisible" ) ) );
if ( !bAllowDropDown )
aForbiddenProperties.insert( PROPERTY_DROPDOWN );
diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx
index 3491c2142449..1d6d204ea977 100644
--- a/forms/source/component/ComboBox.cxx
+++ b/forms/source/component/ComboBox.cxx
@@ -733,6 +733,8 @@ void OComboBoxModel::onDisconnectedDbColumn()
// reset the string item list
if ( !hasExternalListSource() )
setFastPropertyValue( PROPERTY_ID_STRINGITEMLIST, makeAny( m_aDesignModeStringItems ) );
+
+ m_aListRowSet.dispose();
}
//------------------------------------------------------------------------------
diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx
index 6e700c28f6d8..23c05be9f89f 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -239,22 +239,9 @@ Sequence<Type> OControl::_getTypes()
}
//------------------------------------------------------------------------------
-void OControl::initFormControlPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& _rxPeer )
+void OControl::initFormControlPeer( const Reference< XWindowPeer >& /*_rxPeer*/ )
{
- try
- {
- Reference< XVclWindowPeer > xVclWindowPeer( _rxPeer, UNO_QUERY_THROW );
-
- // #i63103# - form controls should only react on the mouse wheel when they're focused
- xVclWindowPeer->setProperty(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "WheelWithoutFocus" ) ),
- makeAny( sal_Bool( sal_False ) )
- );
- }
- catch( const Exception& )
- {
- DBG_UNHANDLED_EXCEPTION();
- }
+ // nothing to do here
}
// OComponentHelper
@@ -2164,9 +2151,9 @@ sal_Bool OBoundControlModel::connectToField(const Reference<XRowSet>& rForm)
try
{
+ sal_Int32 nFieldType = DataType::OTHER;
if ( xFieldCandidate.is() )
{
- sal_Int32 nFieldType = 0;
xFieldCandidate->getPropertyValue( PROPERTY_FIELDTYPE ) >>= nFieldType;
if ( approveDbColumnType( nFieldType ) )
impl_setField_noNotify( xFieldCandidate );
@@ -2178,6 +2165,8 @@ sal_Bool OBoundControlModel::connectToField(const Reference<XRowSet>& rForm)
{
if( m_xField->getPropertySetInfo()->hasPropertyByName( PROPERTY_VALUE ) )
{
+ m_nFieldType = nFieldType;
+
// an wertaenderungen horchen
m_xField->addPropertyChangeListener( PROPERTY_VALUE, this );
m_xColumnUpdate = Reference< XColumnUpdate >( m_xField, UNO_QUERY );
diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx
index 9ca5a1b02ef3..ef0abf146632 100644
--- a/forms/source/component/Grid.cxx
+++ b/forms/source/component/Grid.cxx
@@ -104,6 +104,7 @@ OGridControlModel::OGridControlModel(const Reference<XMultiServiceFactory>& _rxF
,m_nBorder(1)
,m_nWritingMode( WritingMode2::CONTEXT )
,m_nContextWritingMode( WritingMode2::CONTEXT )
+ ,m_bEnableVisible(sal_True)
,m_bEnable(sal_True)
,m_bNavigation(sal_True)
,m_bRecordMarker(sal_True)
@@ -130,6 +131,7 @@ OGridControlModel::OGridControlModel( const OGridControlModel* _pOriginal, const
m_aDefaultControl = _pOriginal->m_aDefaultControl;
m_bEnable = _pOriginal->m_bEnable;
+ m_bEnableVisible = _pOriginal->m_bEnableVisible;
m_bNavigation = _pOriginal->m_bNavigation;
m_nBorder = _pOriginal->m_nBorder;
m_nWritingMode = _pOriginal->m_nWritingMode;
@@ -457,7 +459,7 @@ void OGridControlModel::_reset()
//------------------------------------------------------------------------------
void OGridControlModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
- BEGIN_DESCRIBE_BASE_PROPERTIES( 36 )
+ BEGIN_DESCRIBE_BASE_PROPERTIES( 37 )
DECL_PROP1(NAME, ::rtl::OUString, BOUND);
DECL_PROP2(CLASSID, sal_Int16, READONLY, TRANSIENT);
DECL_PROP1(TAG, ::rtl::OUString, BOUND);
@@ -465,6 +467,7 @@ void OGridControlModel::describeFixedProperties( Sequence< Property >& _rProps )
DECL_PROP3(TABSTOP, sal_Bool, BOUND, MAYBEDEFAULT, MAYBEVOID);
DECL_PROP2(HASNAVIGATION, sal_Bool, BOUND, MAYBEDEFAULT);
DECL_PROP1(ENABLED, sal_Bool, BOUND);
+ DECL_PROP2(ENABLEVISIBLE, sal_Bool, BOUND, MAYBEDEFAULT);
DECL_PROP1(BORDER, sal_Int16, BOUND);
DECL_PROP2(BORDERCOLOR, sal_Int16, BOUND, MAYBEVOID);
DECL_PROP1(DEFAULTCONTROL, ::rtl::OUString, BOUND);
@@ -538,6 +541,9 @@ void OGridControlModel::getFastPropertyValue(Any& rValue, sal_Int32 nHandle ) co
case PROPERTY_ID_ENABLED:
setBOOL(rValue, m_bEnable);
break;
+ case PROPERTY_ID_ENABLEVISIBLE:
+ setBOOL(rValue, m_bEnableVisible);
+ break;
case PROPERTY_ID_BORDER:
rValue <<= (sal_Int16)m_nBorder;
break;
@@ -616,6 +622,9 @@ sal_Bool OGridControlModel::convertFastPropertyValue( Any& rConvertedValue, Any&
case PROPERTY_ID_ENABLED:
bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bEnable);
break;
+ case PROPERTY_ID_ENABLEVISIBLE:
+ bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bEnableVisible);
+ break;
case PROPERTY_ID_BORDER:
bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_nBorder);
break;
@@ -687,6 +696,9 @@ void OGridControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, con
case PROPERTY_ID_ENABLED:
m_bEnable = getBOOL(rValue);
break;
+ case PROPERTY_ID_ENABLEVISIBLE:
+ m_bEnableVisible = getBOOL(rValue);
+ break;
case PROPERTY_ID_RECORDMARKER:
m_bRecordMarker = getBOOL(rValue);
break;
@@ -744,6 +756,7 @@ Any OGridControlModel::getPropertyDefaultByHandle( sal_Int32 nHandle ) const
case PROPERTY_ID_RECORDMARKER:
case PROPERTY_ID_DISPLAYSYNCHRON:
case PROPERTY_ID_ENABLED:
+ case PROPERTY_ID_ENABLEVISIBLE:
aReturn = makeBoolAny(sal_True);
break;
diff --git a/forms/source/component/Grid.hxx b/forms/source/component/Grid.hxx
index 56981f54349b..f5bb60489e45 100644
--- a/forms/source/component/Grid.hxx
+++ b/forms/source/component/Grid.hxx
@@ -28,22 +28,22 @@
*
************************************************************************/
-#include "errorbroadcaster.hxx"
-#include "FormComponent.hxx"
-#include "formcontrolfont.hxx"
-#include "InterfaceContainer.hxx"
-
-/** === begin UNO includes === **/
-#include <com/sun/star/form/XGridColumnFactory.hpp>
-#include <com/sun/star/form/XLoadable.hpp>
-#include <com/sun/star/sdb/XRowSetSupplier.hpp>
-#include <com/sun/star/sdb/XRowSetChangeBroadcaster.hpp>
-#include <com/sun/star/view/XSelectionSupplier.hpp>
-/** === end UNO includes === **/
-
-#include <comphelper/proparrhlp.hxx>
-#include <cppuhelper/implbase7.hxx>
-#include <tools/link.hxx>
+#include "errorbroadcaster.hxx"
+#include "FormComponent.hxx"
+#include "formcontrolfont.hxx"
+#include "InterfaceContainer.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/form/XGridColumnFactory.hpp>
+#include <com/sun/star/form/XLoadable.hpp>
+#include <com/sun/star/sdb/XRowSetSupplier.hpp>
+#include <com/sun/star/sdb/XRowSetChangeBroadcaster.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
+/** === end UNO includes === **/
+
+#include <comphelper/proparrhlp.hxx>
+#include <cppuhelper/implbase7.hxx>
+#include <tools/link.hxx>
//.........................................................................
namespace frm
@@ -101,6 +101,7 @@ class OGridControlModel :public OControlModel
sal_Int16 m_nBorder;
sal_Int16 m_nWritingMode;
sal_Int16 m_nContextWritingMode;
+ sal_Bool m_bEnableVisible : 1;
sal_Bool m_bEnable : 1;
sal_Bool m_bNavigation : 1;
sal_Bool m_bRecordMarker : 1;
diff --git a/forms/source/component/navigationbar.cxx b/forms/source/component/navigationbar.cxx
index 236f64f762a8..abe5b5c45488 100644
--- a/forms/source/component/navigationbar.cxx
+++ b/forms/source/component/navigationbar.cxx
@@ -84,6 +84,7 @@ namespace frm
getPropertyDefaultByHandle( PROPERTY_ID_BORDER ) >>= m_nBorder;
getPropertyDefaultByHandle( PROPERTY_ID_DELAY ) >>= m_nDelay;
getPropertyDefaultByHandle( PROPERTY_ID_ENABLED ) >>= m_bEnabled;
+ getPropertyDefaultByHandle( PROPERTY_ID_ENABLEVISIBLE ) >>= m_bEnableVisible;
getPropertyDefaultByHandle( PROPERTY_ID_SHOW_POSITION ) >>= m_bShowPosition;
getPropertyDefaultByHandle( PROPERTY_ID_SHOW_NAVIGATION ) >>= m_bShowNavigation;
getPropertyDefaultByHandle( PROPERTY_ID_SHOW_RECORDACTIONS ) >>= m_bShowActions;
@@ -107,6 +108,7 @@ namespace frm
m_sHelpText = _pOriginal->m_sHelpText;
m_sHelpURL = _pOriginal->m_sHelpURL;
m_bEnabled = _pOriginal->m_bEnabled;
+ m_bEnableVisible = _pOriginal->m_bEnableVisible;
m_nIconSize = _pOriginal->m_nIconSize;
m_nBorder = _pOriginal->m_nBorder;
m_nDelay = _pOriginal->m_nDelay;
@@ -125,6 +127,7 @@ namespace frm
REGISTER_PROP_2( HELPTEXT, m_sHelpText, BOUND, MAYBEDEFAULT );
REGISTER_PROP_2( HELPURL, m_sHelpURL, BOUND, MAYBEDEFAULT );
REGISTER_PROP_2( ENABLED, m_bEnabled, BOUND, MAYBEDEFAULT );
+ REGISTER_PROP_2( ENABLEVISIBLE, m_bEnableVisible, BOUND, MAYBEDEFAULT );
REGISTER_PROP_2( ICONSIZE, m_nIconSize, BOUND, MAYBEDEFAULT );
REGISTER_PROP_2( BORDER, m_nBorder, BOUND, MAYBEDEFAULT );
REGISTER_PROP_2( DELAY, m_nDelay, BOUND, MAYBEDEFAULT );
@@ -444,6 +447,7 @@ namespace frm
break;
case PROPERTY_ID_ENABLED:
+ case PROPERTY_ID_ENABLEVISIBLE:
case PROPERTY_ID_SHOW_POSITION:
case PROPERTY_ID_SHOW_NAVIGATION:
case PROPERTY_ID_SHOW_RECORDACTIONS:
diff --git a/forms/source/component/navigationbar.hxx b/forms/source/component/navigationbar.hxx
index a1f525e61980..1dd94eff2bbc 100644
--- a/forms/source/component/navigationbar.hxx
+++ b/forms/source/component/navigationbar.hxx
@@ -70,6 +70,7 @@ namespace frm
sal_Int16 m_nBorder;
sal_Int32 m_nDelay;
sal_Bool m_bEnabled;
+ sal_Bool m_bEnableVisible;
sal_Bool m_bShowPosition;
sal_Bool m_bShowNavigation;
sal_Bool m_bShowActions;
diff --git a/forms/source/inc/frm_strings.hxx b/forms/source/inc/frm_strings.hxx
index 1eaee92f8421..bf2d5d4d7446 100644
--- a/forms/source/inc/frm_strings.hxx
+++ b/forms/source/inc/frm_strings.hxx
@@ -113,6 +113,7 @@ namespace frm
FORMS_CONSTASCII_STRING( PROPERTY_CYCLE, "Cycle" );
FORMS_CONSTASCII_STRING( PROPERTY_CONTROLSOURCE, "DataField" );
FORMS_CONSTASCII_STRING( PROPERTY_ENABLED, "Enabled" );
+ FORMS_CONSTASCII_STRING( PROPERTY_ENABLEVISIBLE, "EnableVisible" );
FORMS_CONSTASCII_STRING( PROPERTY_READONLY, "ReadOnly" );
FORMS_CONSTASCII_STRING( PROPERTY_RELEVANT, "Relevant" );
FORMS_CONSTASCII_STRING( PROPERTY_ISREADONLY, "IsReadOnly" );
diff --git a/forms/source/inc/property.hrc b/forms/source/inc/property.hrc
index 0a3e3739d31a..df94d1575a5a 100644
--- a/forms/source/inc/property.hrc
+++ b/forms/source/inc/property.hrc
@@ -206,7 +206,7 @@ namespace frm
#define PROPERTY_ID_FILTERPROPOSAL (PROPERTY_ID_START +162) // BOOL
#define PROPERTY_ID_FIELDSOURCE (PROPERTY_ID_START +163) // String
#define PROPERTY_ID_TABLENAME (PROPERTY_ID_START +164) // String
- // FREE
+#define PROPERTY_ID_ENABLEVISIBLE (PROPERTY_ID_START +165) // BOOL
// FREE
// FREE
// FREE
diff --git a/forms/source/misc/property.cxx b/forms/source/misc/property.cxx
index 564cd822f145..12cc73e10264 100644
--- a/forms/source/misc/property.cxx
+++ b/forms/source/misc/property.cxx
@@ -106,6 +106,7 @@ void PropertyInfoService::initialize()
ADD_PROP_ASSIGNMENT(CYCLE);
ADD_PROP_ASSIGNMENT(CONTROLSOURCE);
ADD_PROP_ASSIGNMENT(ENABLED);
+ ADD_PROP_ASSIGNMENT(ENABLEVISIBLE);
ADD_PROP_ASSIGNMENT(SPIN);
ADD_PROP_ASSIGNMENT(READONLY);
ADD_PROP_ASSIGNMENT(FILTER);
diff --git a/forms/source/richtext/richtextmodel.cxx b/forms/source/richtext/richtextmodel.cxx
index ca2bf688a92d..d38b350ada32 100644
--- a/forms/source/richtext/richtextmodel.cxx
+++ b/forms/source/richtext/richtextmodel.cxx
@@ -88,6 +88,7 @@ namespace frm
getPropertyDefaultByHandle( PROPERTY_ID_DEFAULTCONTROL ) >>= m_sDefaultControl;
getPropertyDefaultByHandle( PROPERTY_ID_BORDER ) >>= m_nBorder;
getPropertyDefaultByHandle( PROPERTY_ID_ENABLED ) >>= m_bEnabled;
+ getPropertyDefaultByHandle( PROPERTY_ID_ENABLEVISIBLE ) >>= m_bEnableVisible;
getPropertyDefaultByHandle( PROPERTY_ID_HARDLINEBREAKS ) >>= m_bHardLineBreaks;
getPropertyDefaultByHandle( PROPERTY_ID_HSCROLL ) >>= m_bHScroll;
getPropertyDefaultByHandle( PROPERTY_ID_VSCROLL ) >>= m_bVScroll;
@@ -124,6 +125,7 @@ namespace frm
m_sHelpURL = _pOriginal->m_sHelpURL;
m_nBorder = _pOriginal->m_nBorder;
m_bEnabled = _pOriginal->m_bEnabled;
+ m_bEnableVisible = _pOriginal->m_bEnableVisible;
m_bHardLineBreaks = _pOriginal->m_bHardLineBreaks;
m_bHScroll = _pOriginal->m_bHScroll;
m_bVScroll = _pOriginal->m_bVScroll;
@@ -188,6 +190,7 @@ namespace frm
REGISTER_PROP_2( HELPTEXT, m_sHelpText, BOUND, MAYBEDEFAULT );
REGISTER_PROP_2( HELPURL, m_sHelpURL, BOUND, MAYBEDEFAULT );
REGISTER_PROP_2( ENABLED, m_bEnabled, BOUND, MAYBEDEFAULT );
+ REGISTER_PROP_2( ENABLEVISIBLE, m_bEnableVisible, BOUND, MAYBEDEFAULT );
REGISTER_PROP_2( BORDER, m_nBorder, BOUND, MAYBEDEFAULT );
REGISTER_PROP_2( HARDLINEBREAKS, m_bHardLineBreaks, BOUND, MAYBEDEFAULT );
REGISTER_PROP_2( HSCROLL, m_bHScroll, BOUND, MAYBEDEFAULT );
@@ -456,6 +459,7 @@ namespace frm
break;
case PROPERTY_ID_ENABLED:
+ case PROPERTY_ID_ENABLEVISIBLE:
case PROPERTY_ID_PRINTABLE:
case PROPERTY_ID_HIDEINACTIVESELECTION:
aDefault <<= (sal_Bool)sal_True;
diff --git a/forms/source/richtext/richtextmodel.hxx b/forms/source/richtext/richtextmodel.hxx
index b124f76c4237..5e905e2873ad 100644
--- a/forms/source/richtext/richtextmodel.hxx
+++ b/forms/source/richtext/richtextmodel.hxx
@@ -83,6 +83,7 @@ namespace frm
sal_Int16 m_nContextWritingMode;
sal_Int16 m_nBorder;
sal_Bool m_bEnabled;
+ sal_Bool m_bEnableVisible;
sal_Bool m_bHardLineBreaks;
sal_Bool m_bHScroll;
sal_Bool m_bVScroll;
diff --git a/forms/util/makefile.mk b/forms/util/makefile.mk
index 1e99e6446f47..17f594ba7c4f 100644
--- a/forms/util/makefile.mk
+++ b/forms/util/makefile.mk
@@ -73,7 +73,7 @@ SHL1STDLIBS= \
$(COMPHELPERLIB) \
$(DBTOOLSLIB) \
$(TKLIB) \
- $(SVXLIB) \
+ $(SVXCORELIB) \
$(UCBHELPERLIB) \
$(LIBXML2LIB) \
$(ICUUCLIB) \