summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
Diffstat (limited to 'forms')
-rwxr-xr-x[-rw-r--r--]forms/inc/pch/precompiled_forms.hxx4
-rw-r--r--forms/prj/build.lst3
-rw-r--r--forms/prj/d.lst1
-rw-r--r--forms/qa/complex/forms/CheckOGroupBoxModel.java203
-rwxr-xr-xforms/qa/complex/forms/makefile.mk115
-rw-r--r--forms/qa/integration/forms/ListSelection.java5
-rw-r--r--forms/qa/makefile.mk17
-rw-r--r--forms/qa/unoapi/forms.sce2
-rw-r--r--forms/qa/unoapi/knownissues.xcl8
-rw-r--r--forms/source/component/Button.cxx2
-rw-r--r--forms/source/component/Button.hxx2
-rw-r--r--forms/source/component/DatabaseForm.cxx4
-rw-r--r--forms/source/component/DatabaseForm.hxx2
-rw-r--r--forms/source/component/Edit.cxx2
-rw-r--r--forms/source/component/Filter.cxx62
-rw-r--r--forms/source/component/Filter.hxx6
-rw-r--r--forms/source/component/FormComponent.cxx60
-rw-r--r--forms/source/component/FormattedField.cxx4
-rw-r--r--forms/source/component/Hidden.cxx2
-rw-r--r--forms/source/component/ImageControl.cxx2
-rw-r--r--forms/source/component/ListBox.cxx24
-rw-r--r--forms/source/component/RadioButton.cxx2
-rw-r--r--forms/source/helper/windowstateguard.cxx28
-rw-r--r--forms/source/inc/FormComponent.hxx8
-rw-r--r--forms/source/inc/forms_module.hxx15
-rw-r--r--forms/source/inc/forms_module_impl.hxx48
-rw-r--r--forms/source/misc/services.cxx67
-rw-r--r--forms/source/richtext/clipboarddispatcher.cxx4
-rw-r--r--forms/source/richtext/richtextcontrol.cxx2
-rw-r--r--forms/source/richtext/richtextcontrol.hxx6
-rw-r--r--forms/source/richtext/richtextengine.cxx2
-rw-r--r--forms/source/richtext/richtextimplcontrol.cxx12
-rw-r--r--forms/source/richtext/richtextimplcontrol.hxx2
-rw-r--r--forms/source/richtext/richtextmodel.cxx2
-rw-r--r--forms/source/richtext/richtextunowrapper.cxx4
-rw-r--r--forms/source/richtext/richtextvclcontrol.cxx8
-rw-r--r--forms/source/richtext/richtextvclcontrol.hxx2
-rw-r--r--forms/source/richtext/richtextviewport.cxx2
-rw-r--r--forms/source/richtext/rtattributehandler.cxx14
-rw-r--r--forms/source/richtext/rtattributehandler.hxx2
-rw-r--r--forms/source/richtext/rtattributes.hxx6
-rw-r--r--forms/source/richtext/specialdispatchers.cxx4
-rw-r--r--forms/source/solar/component/navbarcontrol.cxx6
-rw-r--r--forms/source/solar/component/navbarcontrol.hxx6
-rw-r--r--forms/source/solar/control/navtoolbar.cxx68
-rw-r--r--forms/source/solar/inc/navtoolbar.hxx18
-rw-r--r--forms/source/xforms/xpathlib/xpathlib.cxx2
-rw-r--r--forms/util/frm.component255
-rw-r--r--forms/util/frm.dxp1
-rw-r--r--forms/util/makefile.mk8
50 files changed, 709 insertions, 425 deletions
diff --git a/forms/inc/pch/precompiled_forms.hxx b/forms/inc/pch/precompiled_forms.hxx
index c1b742f54db9..1951442ada6f 100644..100755
--- a/forms/inc/pch/precompiled_forms.hxx
+++ b/forms/inc/pch/precompiled_forms.hxx
@@ -386,10 +386,10 @@
#include "vcl/bmpacc.hxx"
#include "vcl/cvtgrf.hxx"
#include "vcl/mapmod.hxx"
-#include "vcl/mapunit.hxx"
+#include "tools/mapunit.hxx"
#include "vcl/stdtext.hxx"
#include "vcl/timer.hxx"
-#include "vcl/wintypes.hxx"
+#include "tools/wintypes.hxx"
#include "osl/mutex.hxx"
#include "osl/thread.hxx"
diff --git a/forms/prj/build.lst b/forms/prj/build.lst
index cc71868b734d..81b502832d42 100644
--- a/forms/prj/build.lst
+++ b/forms/prj/build.lst
@@ -1,4 +1,4 @@
-fm forms : l10n oovbaapi svx sfx2 qadevOOo NULL
+fm forms : L10N:l10n oovbaapi svx sfx2 qadevOOo LIBXSLT:libxslt NULL
fm forms usr1 - all fm_mkofrm NULL
fm forms\inc nmake - all fm_inc NULL
fm forms\source\inc get - all fm_sinc NULL
@@ -16,3 +16,4 @@ fm forms\source\runtime nmake - all frm_runtime NULL
fm forms\util nmake - all fm_util fm_component fm_solar_component fm_solar_control fm_helper fm_misc fm_resource fm_richtext frm_runtime fm_xforms NULL
fm forms\qa nmake - all fm_qa NULL
fm forms\qa\unoapi nmake - all fm_qa_unoapi NULL
+fm forms\qa\complex\forms nmake - all fm_qa_complex NULL
diff --git a/forms/prj/d.lst b/forms/prj/d.lst
index de1655d7d7f8..a708dd3e3bc9 100644
--- a/forms/prj/d.lst
+++ b/forms/prj/d.lst
@@ -5,3 +5,4 @@
..\%__SRC%\bin\*.bin %_DEST%\bin%_EXT%\*.bin
..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\*.res
..\util\*.xml %_DEST%\xml%_EXT%\*.xml
+..\%__SRC%\misc\frm.component %_DEST%\xml%_EXT%\frm.component
diff --git a/forms/qa/complex/forms/CheckOGroupBoxModel.java b/forms/qa/complex/forms/CheckOGroupBoxModel.java
index 3c03176fd236..490a2ae695c5 100644
--- a/forms/qa/complex/forms/CheckOGroupBoxModel.java
+++ b/forms/qa/complex/forms/CheckOGroupBoxModel.java
@@ -24,7 +24,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
package complex.forms;
import com.sun.star.beans.Property;
@@ -37,88 +36,127 @@ import com.sun.star.drawing.XControlShape;
import com.sun.star.lang.XComponent;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.uno.UnoRuntime;
-import complexlib.ComplexTestCase;
-import java.io.PrintWriter;
+// import complexlib.ComplexTestCase;
+import com.sun.star.util.CloseVetoException;
+import com.sun.star.util.XCloseable;
import java.util.Vector;
+import java.util.logging.Level;
+import java.util.logging.Logger;
import util.FormTools;
import util.SOfficeFactory;
import util.ValueChanger;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
+
/**
*/
-public class CheckOGroupBoxModel extends ComplexTestCase {
-
- private XMultiPropertySet xPropSet = null;
-
- public String[] getTestMethodNames() {
- return new String[] {"setPropertyValues"};
- }
-
- public void before() {
- XComponent xDrawDoc = null;
- SOfficeFactory SOF = SOfficeFactory.getFactory(((XMultiServiceFactory) param.getMSF()));
-
- try {
- log.println("creating a draw document");
- xDrawDoc = SOF.createDrawDoc(null);
- } catch (com.sun.star.uno.Exception e) {
- e.printStackTrace((PrintWriter)log);
- failed("Couldn't create document.");
+public class CheckOGroupBoxModel
+{
+
+ private XMultiPropertySet m_xPropSet;
+ private XComponent m_xDrawDoc;
+
+// public String[] getTestMethodNames() {
+// return new String[] {"setPropertyValues"};
+// }
+ @Before public void before()
+ {
+ // XComponent xDrawDoc = null;
+ SOfficeFactory SOF = SOfficeFactory.getFactory(getMSF());
+
+ try
+ {
+ System.out.println("creating a draw document");
+ m_xDrawDoc = SOF.createDrawDoc(null);
+ }
+ catch (com.sun.star.uno.Exception e)
+ {
+ fail("Couldn't create document.");
}
String objName = "GroupBox";
- XControlShape shape = FormTools.insertControlShape(xDrawDoc, 5000, 7000, 2000, 2000, objName);
- xPropSet = (XMultiPropertySet)UnoRuntime.queryInterface(XMultiPropertySet.class, shape.getControl());
+ XControlShape shape = FormTools.insertControlShape(m_xDrawDoc, 5000, 7000, 2000, 2000, objName);
+ m_xPropSet = UnoRuntime.queryInterface(XMultiPropertySet.class, shape.getControl());
}
-
- public void setPropertyValues() {
+ @After public void after()
+ {
+ XCloseable xClose = UnoRuntime.queryInterface(XCloseable.class, m_xDrawDoc);
+ if (xClose != null)
+ {
+ try
+ {
+ xClose.close(true);
+ }
+ catch (CloseVetoException ex)
+ {
+ fail("Can't close document. Exception caught: " + ex.getMessage());
+ /* ignore! */
+ }
+ }
+ }
+ @Test public void setPropertyValues()
+ {
String[] boundPropsToTest = getBoundPropsToTest();
MyChangeListener ml = new MyChangeListener();
- xPropSet.addPropertiesChangeListener(boundPropsToTest, ml);
+ m_xPropSet.addPropertiesChangeListener(boundPropsToTest, ml);
- Object[] gValues = xPropSet.getPropertyValues(boundPropsToTest);
+ Object[] gValues = m_xPropSet.getPropertyValues(boundPropsToTest);
Object[] newValue = new Object[gValues.length];
- log.println("Trying to change all properties.");
- for (int i=0; i<boundPropsToTest.length; i++) {
+ System.out.println("Trying to change all properties.");
+ for (int i = 0; i < boundPropsToTest.length; i++)
+ {
newValue[i] = ValueChanger.changePValue(gValues[i]);
}
- try {
- xPropSet.setPropertyValues(boundPropsToTest, newValue);
- } catch (com.sun.star.beans.PropertyVetoException e) {
- e.printStackTrace((PrintWriter)log);
- failed("Exception occurred while trying to change the properties.");
- } catch (com.sun.star.lang.IllegalArgumentException e) {
- e.printStackTrace((PrintWriter)log);
- failed("Exception occurred while trying to change the properties.");
- } catch (com.sun.star.lang.WrappedTargetException e) {
- e.printStackTrace((PrintWriter)log);
- failed("Exception occurred while trying to change the properties.");
+ try
+ {
+ m_xPropSet.setPropertyValues(boundPropsToTest, newValue);
+ }
+ catch (com.sun.star.beans.PropertyVetoException e)
+ {
+ fail("Exception occured while trying to change the properties.");
+ }
+ catch (com.sun.star.lang.IllegalArgumentException e)
+ {
+ fail("Exception occured while trying to change the properties.");
+ }
+ catch (com.sun.star.lang.WrappedTargetException e)
+ {
+ fail("Exception occured while trying to change the properties.");
} // end of try-catch
- assure("Listener was not called.", ml.wasListenerCalled());
- xPropSet.removePropertiesChangeListener(ml);
+ assertTrue("Listener was not called.", ml.wasListenerCalled());
+ m_xPropSet.removePropertiesChangeListener(ml);
}
- private String[] getBoundPropsToTest() {
- Property[] properties = xPropSet.getPropertySetInfo().getProperties();
+ private String[] getBoundPropsToTest()
+ {
+ Property[] properties = m_xPropSet.getPropertySetInfo().getProperties();
String[] testPropsNames = null;
- Vector tNames = new Vector();
+ Vector<String> tNames = new Vector<String>();
- for (int i = 0; i < properties.length; i++) {
+ for (int i = 0; i < properties.length; i++)
+ {
Property property = properties[i];
String name = property.Name;
- boolean isWritable = ((property.Attributes &
- PropertyAttribute.READONLY) == 0);
- boolean isNotNull = ((property.Attributes &
- PropertyAttribute.MAYBEVOID) == 0);
- boolean isBound = ((property.Attributes &
- PropertyAttribute.BOUND) != 0);
-
- if ( isWritable && isNotNull && isBound) {
+ boolean isWritable = ((property.Attributes
+ & PropertyAttribute.READONLY) == 0);
+ boolean isNotNull = ((property.Attributes
+ & PropertyAttribute.MAYBEVOID) == 0);
+ boolean isBound = ((property.Attributes
+ & PropertyAttribute.BOUND) != 0);
+
+ if (isWritable && isNotNull && isBound)
+ {
tNames.add(name);
}
@@ -126,22 +164,59 @@ public class CheckOGroupBoxModel extends ComplexTestCase {
//get a array of bound properties
testPropsNames = new String[tNames.size()];
- testPropsNames = (String[])tNames.toArray(testPropsNames);
+ testPropsNames = tNames.toArray(testPropsNames);
return testPropsNames;
}
/**
- * Listener implementation which sets a flag when
- * listener was called.
- */
- public class MyChangeListener implements XPropertiesChangeListener {
+ * Listener implementation which sets a flag when
+ * listener was called.
+ */
+ public class MyChangeListener implements XPropertiesChangeListener
+ {
+
boolean propertiesChanged = false;
- public void propertiesChange(PropertyChangeEvent[] e) {
- propertiesChanged = true;
+
+ public void propertiesChange(PropertyChangeEvent[] e)
+ {
+ propertiesChanged = true;
+ }
+
+ public void disposing(EventObject obj)
+ {
+ }
+
+ public boolean wasListenerCalled()
+ {
+ return propertiesChanged;
+ }
+
+ public void reset()
+ {
+ propertiesChanged = false;
}
- public void disposing (EventObject obj) {}
- public boolean wasListenerCalled() { return propertiesChanged; }
- public void reset() { propertiesChanged = false; }
};
+ private XMultiServiceFactory getMSF()
+ {
+ final XMultiServiceFactory xMSF1 = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager());
+ return xMSF1;
+ }
+
+ // setup and close connections
+ @BeforeClass
+ public static void setUpConnection() throws Exception
+ {
+ System.out.println("setUpConnection()");
+ connection.setUp();
+ }
+
+ @AfterClass
+ public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ System.out.println("tearDownConnection()");
+ connection.tearDown();
+ }
+ private static final OfficeConnection connection = new OfficeConnection();
}
diff --git a/forms/qa/complex/forms/makefile.mk b/forms/qa/complex/forms/makefile.mk
index 6caf244cddc1..c5895b708fb1 100755
--- a/forms/qa/complex/forms/makefile.mk
+++ b/forms/qa/complex/forms/makefile.mk
@@ -25,54 +25,93 @@
#
#*************************************************************************
-PRJ = ..$/..$/..
-TARGET = CheckOGroupBoxModel
-PRJNAME = $(TARGET)
-PACKAGE = complex$/forms
-
-# --- Settings -----------------------------------------------------
-.INCLUDE: settings.mk
-
-
-#----- compile .java files -----------------------------------------
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
-JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar mysql.jar
-JAVAFILES = CheckOGroupBoxModel.java
-JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
+PRJ = ../../..
+PRJNAME = forms
+TARGET = qa_complex_forms
-#----- make a jar from compiled files ------------------------------
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = complex/forms
-MAXLINELENGTH = 100000
+# here store only Files which contain a @Test
+JAVATESTFILES = \
+ CheckOGroupBoxModel.java
-JARCLASSDIRS = $(PACKAGE)
+# put here all other files
+JAVAFILES = $(JAVATESTFILES)
-# --- Parameters for the test --------------------------------------
-# start an office if the parameter is set for the makefile
-.IF "$(OFFICE)" == ""
-CT_APPEXECCOMMAND =
-.ELSE
-CT_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;"
-.ENDIF
+JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
-# test base is java complex
-CT_TESTBASE = -TestBase java_complex
+# Sample how to debug
+# JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y
-# build up package name with "." instead of $/
-CT_PACKAGE = -o $(PACKAGE:s\$/\.\)
+.END
-# start the runner application
-CT_APP = org.openoffice.Runner
+.INCLUDE: settings.mk
+.INCLUDE: target.mk
+.INCLUDE: installationtest.mk
-# --- Targets ------------------------------------------------------
+ALLTAR : javatest
-.IF "$(depend)" == ""
-run : ALLTAR
-.ELSE
-run : ALLDEP
-.ENDIF
+.END
-.INCLUDE : target.mk
-run:
- +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) $(CT_PACKAGE).$(JAVAFILES:b)
+#
+#
+#
+# PRJ = ..$/..$/..
+# TARGET = CheckOGroupBoxModel
+# PRJNAME = $(TARGET)
+# PACKAGE = complex$/forms
+#
+# # --- Settings -----------------------------------------------------
+# .INCLUDE: settings.mk
+#
+#
+# #----- compile .java files -----------------------------------------
+#
+# JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar mysql.jar
+# JAVAFILES = CheckOGroupBoxModel.java
+# JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
+#
+# #----- make a jar from compiled files ------------------------------
+#
+# MAXLINELENGTH = 100000
+#
+# JARCLASSDIRS = $(PACKAGE)
+#
+# # --- Parameters for the test --------------------------------------
+#
+# # start an office if the parameter is set for the makefile
+# .IF "$(OFFICE)" == ""
+# CT_APPEXECCOMMAND =
+# .ELSE
+# CT_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;"
+# .ENDIF
+#
+# # test base is java complex
+# CT_TESTBASE = -TestBase java_complex
+#
+# # build up package name with "." instead of $/
+# CT_PACKAGE = -o $(PACKAGE:s\$/\.\)
+#
+# # start the runner application
+# CT_APP = org.openoffice.Runner
+#
+# # --- Targets ------------------------------------------------------
+#
+# .IF "$(depend)" == ""
+# run : ALLTAR
+# .ELSE
+# run : ALLDEP
+# .ENDIF
+#
+# .INCLUDE : target.mk
+#
+# run:
+# +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) $(CT_PACKAGE).$(JAVAFILES:b)
diff --git a/forms/qa/integration/forms/ListSelection.java b/forms/qa/integration/forms/ListSelection.java
index 24a5290dc1d4..17026c09906e 100644
--- a/forms/qa/integration/forms/ListSelection.java
+++ b/forms/qa/integration/forms/ListSelection.java
@@ -136,8 +136,8 @@ public class ListSelection extends integration.forms.TestCase
}
catch( com.sun.star.uno.Exception e )
{
- System.err.println( e );
e.printStackTrace( System.err );
+ failed( "caught an exception: " + e.toString() );
}
}
@@ -183,6 +183,7 @@ public class ListSelection extends integration.forms.TestCase
catch( com.sun.star.uno.Exception e )
{
e.printStackTrace( System.err );
+ failed( "caught an exception: " + e.toString() );
}
}
@@ -217,6 +218,7 @@ public class ListSelection extends integration.forms.TestCase
catch( com.sun.star.uno.Exception e )
{
e.printStackTrace( System.err );
+ failed( "caught an exception: " + e.toString() );
}
}
@@ -275,6 +277,7 @@ public class ListSelection extends integration.forms.TestCase
catch( java.lang.Throwable e )
{
e.printStackTrace();
+ failed( "caught an exception: " + e.toString() );
}
}
diff --git a/forms/qa/makefile.mk b/forms/qa/makefile.mk
index 60768dfc1484..693183d47e2d 100644
--- a/forms/qa/makefile.mk
+++ b/forms/qa/makefile.mk
@@ -37,14 +37,10 @@ PRJNAME = forms
JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar ConnectivityTools.jar
JAVAFILES := $(shell @$(FIND) org -name "*.java") \
$(shell @$(FIND) integration -name "*.java")
-JAVACLASSFILES := $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(i:d)$/$(i:b).class)
#----- make a jar from compiled files ------------------------------
-MAXLINELENGTH = 100000
-
JARTARGET = $(TARGET).jar
-JARCOMPRESS = TRUE
# --- Runner Settings ----------------------------------------------
@@ -65,14 +61,11 @@ ALL: ALLDEP
.INCLUDE : target.mk
-check:
- echo $(SOLARBINDIR)
-
-show_targets:
+show_targets: $(CLASSDIR)$/$(JARTARGET)
+@$(AUGMENT_LIBRARY_PATH) java $(RUNNER_CLASSPATH) complexlib.ShowTargets $(foreach,i,$(JAVAFILES) $(i:s/.\$///:s/.java//))
-run:
- +$(COPY) integration$/forms$/*.props $(CLASSDIR)$/$(PACKAGE) && $(AUGMENT_LIBRARY_PATH) java $(RUNNER_CLASSPATH) $(RUNNER_ARGS) -sce forms_all.sce
+run: $(CLASSDIR)$/$(JARTARGET)
+ +$(COPY) integration$/forms$/*.props $(CLASSDIR) && $(AUGMENT_LIBRARY_PATH) java $(RUNNER_CLASSPATH) $(RUNNER_ARGS) -sce forms_all.sce
-run_%:
- +$(COPY) integration$/forms$/*.props $(CLASSDIR)$/$(PACKAGE) && $(AUGMENT_LIBRARY_PATH) java $(RUNNER_CLASSPATH) $(RUNNER_ARGS) -o integration.$(PRJNAME).$(@:s/run_//)
+run_%: $(CLASSDIR)$/$(JARTARGET)
+ +$(COPY) integration$/forms$/*.props $(CLASSDIR) && $(AUGMENT_LIBRARY_PATH) java $(RUNNER_CLASSPATH) $(RUNNER_ARGS) -o integration.$(PRJNAME).$(@:s/run_//)
diff --git a/forms/qa/unoapi/forms.sce b/forms/qa/unoapi/forms.sce
index 073472f03126..8ac840e7ca1e 100644
--- a/forms/qa/unoapi/forms.sce
+++ b/forms/qa/unoapi/forms.sce
@@ -24,7 +24,7 @@
-o forms.OImageButtonModel
-o forms.OImageControlControl
-o forms.OImageControlModel
--o forms.OListBoxControl
+#i114669 -o forms.OListBoxControl
-o forms.OListBoxModel
-o forms.ONavigationBarControl
-o forms.ONavigationBarModel
diff --git a/forms/qa/unoapi/knownissues.xcl b/forms/qa/unoapi/knownissues.xcl
index 2e10a269c681..66e02dc8d8c4 100644
--- a/forms/qa/unoapi/knownissues.xcl
+++ b/forms/qa/unoapi/knownissues.xcl
@@ -121,9 +121,11 @@ forms.OComboBoxModel::com::sun::star::form::XUpdateBroadcaster
forms.OFileControlModel::com::sun::star::beans::XFastPropertySet
forms.OFileControlModel::com::sun::star::form::FormControlModel
-### i111148 ###
-forms.OImageControlModel::com::sun::star::beans::XMultiPropertySet
-forms.OImageControlModel::com::sun::star::beans::XPropertySet
+### i113201 ###
+forms.OEditModel::com::sun::star::form::validation::XValidatableFormComponent
+
+### i114209 ###
+forms.OGridControlModel::com::sun::star::view::XSelectionSupplier
### i111333 ###
forms.OImageControlControl::com::sun::star::awt::XControl
diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx
index 65838c5d9a3b..33d1e9d3a553 100644
--- a/forms/source/component/Button.cxx
+++ b/forms/source/component/Button.cxx
@@ -440,7 +440,7 @@ void SAL_CALL OButtonControl::disposing( const EventObject& _rSource ) throw( Ru
void OButtonControl::actionPerformed(const ActionEvent& /*rEvent*/) throw ( ::com::sun::star::uno::RuntimeException)
{
// Asynchron fuer starutil::URL-Button
- ULONG n = Application::PostUserEvent( LINK(this, OButtonControl,OnClick) );
+ sal_uLong n = Application::PostUserEvent( LINK(this, OButtonControl,OnClick) );
{
::osl::MutexGuard aGuard( m_aMutex );
m_nClickEvent = n;
diff --git a/forms/source/component/Button.hxx b/forms/source/component/Button.hxx
index b866c55b3b1c..1c6b168a877c 100644
--- a/forms/source/component/Button.hxx
+++ b/forms/source/component/Button.hxx
@@ -128,7 +128,7 @@ class OButtonControl :public OButtonControl_BASE
,public OFormNavigationHelper
{
private:
- ULONG m_nClickEvent;
+ sal_uLong m_nClickEvent;
sal_Int16 m_nTargetUrlFeatureId;
/// caches the value of the "Enabled" property of our model
sal_Bool m_bEnabledByPropertyValue;
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index e29a2ad14210..74fab9759d33 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -1500,8 +1500,8 @@ Reference< XCloneable > SAL_CALL ODatabaseForm::createClone( ) throw (RuntimeEx
//------------------------------------------------------------------------------
void ODatabaseForm::fire( sal_Int32* pnHandles, const Any* pNewValues, const Any* pOldValues, sal_Int32 nCount, sal_Bool bVetoable )
{
- // same as in getFastPropertyValue(INT32) : if we're resetting currently don't fire any changes of the
- // IsModified property from FALSE to TRUE, as this is only temporary 'til the reset is done
+ // same as in getFastPropertyValue(sal_Int32) : if we're resetting currently don't fire any changes of the
+ // IsModified property from sal_False to sal_True, as this is only temporary 'til the reset is done
if (m_nResetsPending > 0)
{
// look for the PROPERTY_ID_ISMODIFIED
diff --git a/forms/source/component/DatabaseForm.hxx b/forms/source/component/DatabaseForm.hxx
index 75249a2b8adf..14fe7111e835 100644
--- a/forms/source/component/DatabaseForm.hxx
+++ b/forms/source/component/DatabaseForm.hxx
@@ -200,7 +200,7 @@ class ODatabaseForm :public OFormComponents
// will be used as additional context information
// when an exception is catched and forwarded to the listeners
- INT32 m_nResetsPending;
+ sal_Int32 m_nResetsPending;
// <overwritten_properties>
sal_Int32 m_nPrivileges;
sal_Bool m_bInsertOnly;
diff --git a/forms/source/component/Edit.cxx b/forms/source/component/Edit.cxx
index c7cdda51722a..d948dec4f392 100644
--- a/forms/source/component/Edit.cxx
+++ b/forms/source/component/Edit.cxx
@@ -40,7 +40,7 @@
#include <com/sun/star/awt/XVclWindowPeer.hpp>
#include <vcl/svapp.hxx>
-#include <vcl/wintypes.hxx>
+#include <tools/wintypes.hxx>
#include <connectivity/dbtools.hxx>
#include <connectivity/formattedcolumnvalue.hxx>
diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx
index 6aff61483a6d..d5b203249de1 100644
--- a/forms/source/component/Filter.cxx
+++ b/forms/source/component/Filter.cxx
@@ -58,6 +58,7 @@
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
+#include <com/sun/star/awt/XItemList.hpp>
/** === end UNO includes === **/
#include <comphelper/numbers.hxx>
@@ -72,7 +73,7 @@
#include <unotools/localedatawrapper.hxx>
#include <vcl/stdtext.hxx>
#include <vcl/svapp.hxx>
-#include <vcl/wintypes.hxx>
+#include <tools/wintypes.hxx>
//--------------------------------------------------------------------------
extern "C" void SAL_CALL createRegistryInfo_OFilterControl()
@@ -104,8 +105,8 @@ namespace frm
//=====================================================================
//---------------------------------------------------------------------
OFilterControl::OFilterControl( const Reference< XMultiServiceFactory >& _rxORB )
- :m_aTextListeners( *this )
- ,m_aContext( _rxORB )
+ :UnoControl( _rxORB )
+ ,m_aTextListeners( *this )
,m_aParser( _rxORB )
,m_nControlClass( FormComponentType::TEXTFIELD )
,m_bFilterList( sal_False )
@@ -132,11 +133,11 @@ namespace frm
if ( !m_xFormatter.is() )
{
// we can create one from the connection, if it's an SDB connection
- Reference< XNumberFormatsSupplier > xFormatSupplier = ::dbtools::getNumberFormats( m_xConnection, sal_True, m_aContext.getLegacyServiceFactory() );
+ Reference< XNumberFormatsSupplier > xFormatSupplier = ::dbtools::getNumberFormats( m_xConnection, sal_True, maContext.getLegacyServiceFactory() );
if ( xFormatSupplier.is() )
{
- m_aContext.createComponent( "com.sun.star.util.NumberFormatter", m_xFormatter );
+ maContext.createComponent( "com.sun.star.util.NumberFormatter", m_xFormatter );
if ( m_xFormatter.is() )
m_xFormatter->attachNumberFormatsSupplier( xFormatSupplier );
}
@@ -342,11 +343,28 @@ namespace frm
case FormComponentType::LISTBOX:
{
- Sequence< ::rtl::OUString> aValueSelection;
- Reference< XPropertySet > aPropertyPointer(getModel(), UNO_QUERY);
- aPropertyPointer->getPropertyValue(PROPERTY_VALUE_SEQ) >>= aValueSelection;
- if (rEvent.Selected <= aValueSelection.getLength())
- aText.append( aValueSelection[ rEvent.Selected ] );
+ try
+ {
+ const Reference< XItemList > xItemList( getModel(), UNO_QUERY_THROW );
+ ::rtl::OUString sItemText( xItemList->getItemText( rEvent.Selected ) );
+
+ const MapString2String::const_iterator itemPos = m_aDisplayItemToValueItem.find( sItemText );
+ if ( itemPos != m_aDisplayItemToValueItem.end() )
+ {
+ sItemText = itemPos->second;
+ if ( sItemText.getLength() )
+ {
+ ::dbtools::OPredicateInputController aPredicateInput( maContext.getLegacyServiceFactory(), m_xConnection, getParseContext() );
+ ::rtl::OUString sErrorMessage;
+ OSL_VERIFY( aPredicateInput.normalizePredicateString( sItemText, m_xField, &sErrorMessage ) );
+ }
+ }
+ aText.append( sItemText );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
}
break;
@@ -521,7 +539,7 @@ namespace frm
aNewText.trim();
if ( aNewText.getLength() )
{
- ::dbtools::OPredicateInputController aPredicateInput( m_aContext.getLegacyServiceFactory(), m_xConnection, getParseContext() );
+ ::dbtools::OPredicateInputController aPredicateInput( maContext.getLegacyServiceFactory(), m_xConnection, getParseContext() );
::rtl::OUString sErrorMessage;
if ( !aPredicateInput.normalizePredicateString( aNewText, m_xField, &sErrorMessage ) )
{
@@ -614,6 +632,16 @@ namespace frm
{
m_aText = aText;
xListBox->selectItem(m_aText, sal_True);
+ if ( xListBox->getSelectedItemPos() >= 0 )
+ {
+ const bool isQuoted = ( aText.getLength() > 0 )
+ && ( aText[0] == '\'' )
+ && ( aText[aText.getLength() - 1] == '\'' );
+ if ( isQuoted )
+ {
+ xListBox->selectItem( aText.copy( 1, aText.getLength() - 2 ), sal_True );
+ }
+ }
}
} break;
default:
@@ -715,7 +743,7 @@ namespace frm
static ::rtl::OUString s_sDialogServiceName (RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.ErrorMessageDialog") );
- Reference< XExecutableDialog > xErrorDialog( m_aContext.createComponentWithArguments( s_sDialogServiceName, aArgs ), UNO_QUERY );
+ Reference< XExecutableDialog > xErrorDialog( maContext.createComponentWithArguments( s_sDialogServiceName, aArgs ), UNO_QUERY );
if ( xErrorDialog.is() )
xErrorDialog->execute();
else
@@ -804,6 +832,16 @@ namespace frm
case FormComponentType::LISTBOX:
case FormComponentType::COMBOBOX:
m_nControlClass = nClassId;
+ if ( FormComponentType::LISTBOX == nClassId )
+ {
+ Sequence< ::rtl::OUString > aDisplayItems;
+ OSL_VERIFY( xControlModel->getPropertyValue( PROPERTY_STRINGITEMLIST ) >>= aDisplayItems );
+ Sequence< ::rtl::OUString > aValueItems;
+ OSL_VERIFY( xControlModel->getPropertyValue( PROPERTY_VALUE_SEQ ) >>= aValueItems );
+ OSL_ENSURE( aDisplayItems.getLength() == aValueItems.getLength(), "OFilterControl::initialize: inconsistent item lists!" );
+ for ( sal_Int32 i=0; i < ::std::min( aDisplayItems.getLength(), aValueItems.getLength() ); ++i )
+ m_aDisplayItemToValueItem[ aDisplayItems[i] ] = aValueItems[i];
+ }
break;
default:
m_bMultiLine = ::comphelper::hasProperty( PROPERTY_MULTILINE, xControlModel ) && ::comphelper::getBOOL( xControlModel->getPropertyValue( PROPERTY_MULTILINE ) );
diff --git a/forms/source/component/Filter.hxx b/forms/source/component/Filter.hxx
index 8bac596b016d..97b291db9fbb 100644
--- a/forms/source/component/Filter.hxx
+++ b/forms/source/component/Filter.hxx
@@ -46,7 +46,7 @@
#include <connectivity/sqlparse.hxx>
#include <svx/ParseContext.hxx>
-class Window;
+#include <boost/unordered_map.hpp>
//.........................................................................
namespace frm
@@ -69,13 +69,15 @@ namespace frm
{
TextListenerMultiplexer m_aTextListeners;
- ::comphelper::ComponentContext m_aContext;
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xField;
::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > m_xFormatter;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData > m_xMetaData;
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xMessageParent;
+ typedef ::boost::unordered_map< ::rtl::OUString, ::rtl::OUString, ::rtl::OUStringHash > MapString2String;
+ MapString2String m_aDisplayItemToValueItem;
+
::rtl::OUString m_aText;
::connectivity::OSQLParser m_aParser;
sal_Int16 m_nControlClass; // which kind of control do we use?
diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx
index 6cf05e78359e..4eeb9970da33 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -294,11 +294,11 @@ Sequence< ::rtl::OUString > SAL_CALL OControl::getSupportedServiceNames_Static()
//------------------------------------------------------------------------------
void SAL_CALL OControl::disposing(const com::sun::star::lang::EventObject& _rEvent) throw (RuntimeException)
{
- InterfaceRef xAggAsIface;
+ Reference< XInterface > xAggAsIface;
query_aggregation(m_xAggregate, xAggAsIface);
// does the disposing come from the aggregate ?
- if (xAggAsIface != InterfaceRef(_rEvent.Source, UNO_QUERY))
+ if (xAggAsIface != Reference< XInterface >(_rEvent.Source, UNO_QUERY))
{ // no -> forward it
Reference<com::sun::star::lang::XEventListener> xListener;
if (query_aggregation(m_xAggregate, xListener))
@@ -308,16 +308,16 @@ void SAL_CALL OControl::disposing(const com::sun::star::lang::EventObject& _rEve
// XControl
//------------------------------------------------------------------------------
-void SAL_CALL OControl::setContext(const InterfaceRef& Context) throw (RuntimeException)
+void SAL_CALL OControl::setContext(const Reference< XInterface >& Context) throw (RuntimeException)
{
if (m_xControl.is())
m_xControl->setContext(Context);
}
//------------------------------------------------------------------------------
-InterfaceRef SAL_CALL OControl::getContext() throw (RuntimeException)
+Reference< XInterface > SAL_CALL OControl::getContext() throw (RuntimeException)
{
- return m_xControl.is() ? m_xControl->getContext() : InterfaceRef();
+ return m_xControl.is() ? m_xControl->getContext() : Reference< XInterface >();
}
//------------------------------------------------------------------------------
@@ -709,13 +709,13 @@ void OControlModel::doSetDelegator()
// XChild
//------------------------------------------------------------------------------
-InterfaceRef SAL_CALL OControlModel::getParent() throw(RuntimeException)
+Reference< XInterface > SAL_CALL OControlModel::getParent() throw(RuntimeException)
{
return m_xParent;
}
//------------------------------------------------------------------------------
-void SAL_CALL OControlModel::setParent(const InterfaceRef& _rxParent) throw(com::sun::star::lang::NoSupportException, RuntimeException)
+void SAL_CALL OControlModel::setParent(const Reference< XInterface >& _rxParent) throw(com::sun::star::lang::NoSupportException, RuntimeException)
{
osl::MutexGuard aGuard(m_aMutex);
@@ -918,7 +918,7 @@ void OControlModel::read(const Reference<stario::XObjectInputStream>& InStream)
}
// 2. Lesen des Versionsnummer
- UINT16 nVersion = InStream->readShort();
+ sal_uInt16 nVersion = InStream->readShort();
// 3. Lesen der allgemeinen Properties
::comphelper::operator>>( InStream, m_aName);
@@ -1755,7 +1755,7 @@ void SAL_CALL OBoundControlModel::read( const Reference< stario::XObjectInputStr
OControlModel::read(_rxInStream);
osl::MutexGuard aGuard(m_aMutex);
- UINT16 nVersion = _rxInStream->readShort(); (void)nVersion;
+ sal_uInt16 nVersion = _rxInStream->readShort(); (void)nVersion;
::comphelper::operator>>( _rxInStream, m_aControlSource);
}
@@ -1864,30 +1864,24 @@ void OBoundControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, co
throw com::sun::star::lang::IllegalArgumentException();
case PROPERTY_ID_CONTROLLABEL:
{
- DBG_ASSERT(!rValue.hasValue() || (rValue.getValueType().getTypeClass() == TypeClass_INTERFACE),
- "OBoundControlModel::setFastPropertyValue_NoBroadcast : invalid argument !");
- if (!rValue.hasValue())
+ if ( rValue.hasValue() && ( rValue.getValueTypeClass() != TypeClass_INTERFACE ) )
+ throw com::sun::star::lang::IllegalArgumentException();
+
+ Reference< XInterface > xNewValue( rValue, UNO_QUERY );
+ if ( !xNewValue.is() )
{ // set property to "void"
- Reference<com::sun::star::lang::XComponent> xComp(m_xLabelControl, UNO_QUERY);
- if (xComp.is())
- xComp->removeEventListener(static_cast<com::sun::star::lang::XEventListener*>(static_cast<XPropertyChangeListener*>(this)));
+ Reference< XComponent > xComp( m_xLabelControl, UNO_QUERY );
+ if ( xComp.is() )
+ xComp->removeEventListener( static_cast< XPropertyChangeListener* >( this ) );
m_xLabelControl = NULL;
break;
}
- InterfaceRef xNewValue;
- rValue >>= xNewValue;
-
- Reference<XControlModel> xAsModel(xNewValue, UNO_QUERY);
- Reference<com::sun::star::lang::XServiceInfo> xAsServiceInfo(xNewValue, UNO_QUERY);
- Reference<XPropertySet> xAsPropSet(xNewValue, UNO_QUERY);
- Reference<XChild> xAsChild(xNewValue, UNO_QUERY);
- if (!xAsModel.is() || !xAsServiceInfo.is() || !xAsPropSet.is() || !xAsChild.is())
- {
- throw com::sun::star::lang::IllegalArgumentException();
- }
-
- if (!xAsServiceInfo->supportsService(m_aLabelServiceName))
+ Reference< XControlModel > xAsModel ( xNewValue, UNO_QUERY );
+ Reference< XServiceInfo > xAsServiceInfo ( xAsModel, UNO_QUERY );
+ Reference< XPropertySet > xAsPropSet ( xAsServiceInfo, UNO_QUERY );
+ Reference< XChild > xAsChild ( xAsPropSet, UNO_QUERY );
+ if ( !xAsChild.is() || !xAsServiceInfo->supportsService( m_aLabelServiceName ) )
{
throw com::sun::star::lang::IllegalArgumentException();
}
@@ -1895,7 +1889,7 @@ void OBoundControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, co
// check if weself and the given model have a common anchestor (up to the forms collection)
Reference<XChild> xCont;
query_interface(static_cast<XWeak*>(this), xCont);
- InterfaceRef xMyTopLevel = xCont->getParent();
+ Reference< XInterface > xMyTopLevel = xCont->getParent();
while (xMyTopLevel.is())
{
Reference<XForm> xAsForm(xMyTopLevel, UNO_QUERY);
@@ -1904,9 +1898,9 @@ void OBoundControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, co
break;
Reference<XChild> xLoopAsChild(xMyTopLevel, UNO_QUERY);
- xMyTopLevel = xLoopAsChild.is() ? xLoopAsChild->getParent() : InterfaceRef();
+ xMyTopLevel = xLoopAsChild.is() ? xLoopAsChild->getParent() : Reference< XInterface >();
}
- InterfaceRef xNewTopLevel = xAsChild->getParent();
+ Reference< XInterface > xNewTopLevel = xAsChild->getParent();
while (xNewTopLevel.is())
{
Reference<XForm> xAsForm(xNewTopLevel, UNO_QUERY);
@@ -1914,7 +1908,7 @@ void OBoundControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, co
break;
Reference<XChild> xLoopAsChild(xNewTopLevel, UNO_QUERY);
- xNewTopLevel = xLoopAsChild.is() ? xLoopAsChild->getParent() : InterfaceRef();
+ xNewTopLevel = xLoopAsChild.is() ? xLoopAsChild->getParent() : Reference< XInterface >();
}
if (xNewTopLevel != xMyTopLevel)
{
@@ -2131,7 +2125,7 @@ sal_Bool OBoundControlModel::connectToField(const Reference<XRowSet>& rForm)
m_xColumnUpdate = Reference< XColumnUpdate >( m_xField, UNO_QUERY );
m_xColumn = Reference< XColumn >( m_xField, UNO_QUERY );
- INT32 nNullableFlag = ColumnValue::NO_NULLS;
+ sal_Int32 nNullableFlag = ColumnValue::NO_NULLS;
m_xField->getPropertyValue(PROPERTY_ISNULLABLE) >>= nNullableFlag;
m_bRequired = (ColumnValue::NO_NULLS == nNullableFlag);
// we're optimistic : in case of ColumnValue_NULLABLE_UNKNOWN we assume nullability ....
diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx
index 000f3ea3f770..871385c207a6 100644
--- a/forms/source/component/FormattedField.cxx
+++ b/forms/source/component/FormattedField.cxx
@@ -44,7 +44,7 @@
#include <svl/numuno.hxx>
#include <vcl/svapp.hxx>
#include <tools/debug.hxx>
-#include <vcl/wintypes.hxx>
+#include <tools/wintypes.hxx>
#include <i18npool/mslangid.hxx>
#include <rtl/textenc.h>
#include <com/sun/star/sdbc/DataType.hpp>
@@ -1197,7 +1197,7 @@ Any OFormattedModel::translateControlValueToExternalValue( ) const
Any OFormattedModel::translateDbColumnToControlValue()
{
if ( m_bNumeric )
- m_aSaveValue <<= DBTypeConversion::getValue( m_xColumn, m_aNullDate, m_nKeyType ); // #100056# OJ
+ m_aSaveValue <<= DBTypeConversion::getValue( m_xColumn, m_aNullDate ); // #100056# OJ
else
m_aSaveValue <<= m_xColumn->getString();
diff --git a/forms/source/component/Hidden.cxx b/forms/source/component/Hidden.cxx
index e71396ec2a39..b2813dd21d93 100644
--- a/forms/source/component/Hidden.cxx
+++ b/forms/source/component/Hidden.cxx
@@ -170,7 +170,7 @@ void SAL_CALL OHiddenModel::write(const Reference<XObjectOutputStream>& _rxOutSt
void SAL_CALL OHiddenModel::read(const Reference<XObjectInputStream>& _rxInStream) throw(IOException, RuntimeException)
{
// Version
- UINT16 nVersion = _rxInStream->readShort();
+ sal_uInt16 nVersion = _rxInStream->readShort();
// Name
DBG_ASSERT(nVersion != 1, "OHiddenModel::read : this version is obsolete !");
diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx
index 23cb10bd064e..c05e9e3f2828 100644
--- a/forms/source/component/ImageControl.cxx
+++ b/forms/source/component/ImageControl.cxx
@@ -856,7 +856,7 @@ bool OImageControlControl::implInsertGraphics()
implClearGraphics( sal_False );
sal_Bool bIsLink = sal_False;
xController->getValue(ExtendedFilePickerElementIds::CHECKBOX_LINK, 0) >>= bIsLink;
- // Force bIsLink to be TRUE if we're bound to a field. Though we initialized the file picker with IsLink=TRUE
+ // Force bIsLink to be sal_True if we're bound to a field. Though we initialized the file picker with IsLink=TRUE
// in this case, and disabled the respective control, there might be picker implementations which do not
// respect this, and return IsLink=FALSE here. In this case, "normalize" the flag.
// #i112659#
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx
index ac56e7fd8395..a489f50ffeda 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -65,6 +65,8 @@
#include <unotools/sharedunocomponent.hxx>
#include <vcl/svapp.hxx>
+#include <boost/optional.hpp>
+
#include <algorithm>
#include <functional>
@@ -678,9 +680,13 @@ namespace frm
return;
}
- sal_Int16 nBoundColumn = 0;
- if (m_aBoundColumn.getValueType().getTypeClass() == TypeClass_SHORT)
+ ::boost::optional< sal_Int16 > aBoundColumn;
+ if ( m_aBoundColumn.getValueType().getTypeClass() == TypeClass_SHORT )
+ {
+ sal_Int16 nBoundColumn( 0 );
m_aBoundColumn >>= nBoundColumn;
+ aBoundColumn.reset( nBoundColumn );
+ }
::utl::SharedUNOComponent< XResultSet > xListCursor;
try
@@ -704,14 +710,14 @@ namespace frm
::rtl::OUString aFieldName;
::rtl::OUString aBoundFieldName;
- if ((nBoundColumn > 0) && xFieldsByIndex.is())
+ if ( !!aBoundColumn && ( *aBoundColumn >= 0 ) && xFieldsByIndex.is() )
{
- if (xFieldsByIndex->getCount() <= nBoundColumn)
+ if ( *aBoundColumn >= xFieldsByIndex->getCount() )
break;
- Reference<XPropertySet> xFieldAsSet(xFieldsByIndex->getByIndex(nBoundColumn),UNO_QUERY);
+ Reference<XPropertySet> xFieldAsSet(xFieldsByIndex->getByIndex( *aBoundColumn ),UNO_QUERY);
xFieldAsSet->getPropertyValue(PROPERTY_NAME) >>= aBoundFieldName;
- nBoundColumn = 1;
+ aBoundColumn.reset( 1 );
xFieldAsSet.set(xFieldsByIndex->getByIndex(0),UNO_QUERY);
xFieldAsSet->getPropertyValue(PROPERTY_NAME) >>= aFieldName;
@@ -841,11 +847,11 @@ namespace frm
// Feld der BoundColumn des ResultSets holen
m_nBoundColumnType = DataType::SQLNULL;
- if ( ( nBoundColumn > 0 ) && m_xColumn.is() )
+ if ( !!aBoundColumn && ( *aBoundColumn >= 0 ) && m_xColumn.is() )
{ // don't look for a bound column if we're not connected to a field
try
{
- Reference< XPropertySet > xBoundField( xColumns->getByIndex( nBoundColumn ), UNO_QUERY_THROW );
+ Reference< XPropertySet > xBoundField( xColumns->getByIndex( *aBoundColumn ), UNO_QUERY_THROW );
OSL_VERIFY( xBoundField->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Type") ) ) >>= m_nBoundColumnType );
}
catch( const Exception& )
@@ -869,7 +875,7 @@ namespace frm
if ( impl_hasBoundComponent() )
{
- aBoundValue.fill( nBoundColumn + 1, m_nBoundColumnType, xCursorRow );
+ aBoundValue.fill( *aBoundColumn + 1, m_nBoundColumnType, xCursorRow );
aValueList.push_back( aBoundValue );
}
diff --git a/forms/source/component/RadioButton.cxx b/forms/source/component/RadioButton.cxx
index 0f04b9dd3313..5227e5396db8 100644
--- a/forms/source/component/RadioButton.cxx
+++ b/forms/source/component/RadioButton.cxx
@@ -329,7 +329,7 @@ void SAL_CALL ORadioButtonModel::read(const Reference<XObjectInputStream>& _rxIn
::osl::MutexGuard aGuard(m_aMutex);
// Version
- UINT16 nVersion = _rxInStream->readShort();
+ sal_uInt16 nVersion = _rxInStream->readShort();
::rtl::OUString sReferenceValue;
sal_Int16 nDefaultChecked( 0 );
diff --git a/forms/source/helper/windowstateguard.cxx b/forms/source/helper/windowstateguard.cxx
index a35ebd68ff44..7a947ecf30fb 100644
--- a/forms/source/helper/windowstateguard.cxx
+++ b/forms/source/helper/windowstateguard.cxx
@@ -99,7 +99,7 @@ namespace frm
@precond
our mutex is locked
*/
- void impl_ensureEnabledState_nothrow() const;
+ void impl_ensureEnabledState_nothrow_nolck();
};
//--------------------------------------------------------------------
@@ -130,16 +130,24 @@ namespace frm
}
//--------------------------------------------------------------------
- void WindowStateGuard_Impl::impl_ensureEnabledState_nothrow() const
+ void WindowStateGuard_Impl::impl_ensureEnabledState_nothrow_nolck()
{
try
{
- sal_Bool bEnabled = m_xWindow->isEnabled();
+ Reference< XWindow2 > xWindow;
+ sal_Bool bEnabled = sal_False;
sal_Bool bShouldBeEnabled = sal_False;
- OSL_VERIFY( m_xModelProps->getPropertyValue( PROPERTY_ENABLED ) >>= bShouldBeEnabled );
-
- if ( !bShouldBeEnabled && bEnabled )
- m_xWindow->setEnable( sal_False );
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if ( !m_xWindow.is() || !m_xModelProps.is() )
+ return;
+ xWindow = m_xWindow;
+ bEnabled = xWindow->isEnabled();
+ OSL_VERIFY( m_xModelProps->getPropertyValue( PROPERTY_ENABLED ) >>= bShouldBeEnabled );
+ }
+
+ if ( !bShouldBeEnabled && bEnabled && xWindow.is() )
+ xWindow->setEnable( sal_False );
}
catch( const Exception& )
{
@@ -150,15 +158,13 @@ namespace frm
//--------------------------------------------------------------------
void SAL_CALL WindowStateGuard_Impl::windowEnabled( const EventObject& /*e*/ ) throw (RuntimeException)
{
- ::osl::MutexGuard aGuard( m_aMutex );
- impl_ensureEnabledState_nothrow();
+ impl_ensureEnabledState_nothrow_nolck();
}
//--------------------------------------------------------------------
void SAL_CALL WindowStateGuard_Impl::windowDisabled( const EventObject& /*e*/ ) throw (RuntimeException)
{
- ::osl::MutexGuard aGuard( m_aMutex );
- impl_ensureEnabledState_nothrow();
+ impl_ensureEnabledState_nothrow_nolck();
}
//--------------------------------------------------------------------
diff --git a/forms/source/inc/FormComponent.hxx b/forms/source/inc/FormComponent.hxx
index 288f3e030d08..40a4a0705ca5 100644
--- a/forms/source/inc/FormComponent.hxx
+++ b/forms/source/inc/FormComponent.hxx
@@ -384,13 +384,13 @@ protected:
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rFactory, // factory to create the aggregate with
const ::rtl::OUString& _rUnoControlModelTypeName, // service name of te model to aggregate
const ::rtl::OUString& rDefault = ::rtl::OUString(), // service name of the default control
- const sal_Bool _bSetDelegator = sal_True // set to FALSE if you want to call setDelegator later (after returning from this ctor)
+ const sal_Bool _bSetDelegator = sal_True // set to sal_False if you want to call setDelegator later (after returning from this ctor)
);
OControlModel(
const OControlModel* _pOriginal, // the original object to clone
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rFactory, // factory to create the aggregate with
const sal_Bool _bCloneAggregate = sal_True, // should the aggregate of the original be cloned, too?
- const sal_Bool _bSetDelegator = sal_True // set to FALSE if you want to call setDelegator later (after returning from this ctor)
+ const sal_Bool _bSetDelegator = sal_True // set to sal_False if you want to call setDelegator later (after returning from this ctor)
);
virtual ~OControlModel();
@@ -711,8 +711,8 @@ protected:
const ::rtl::OUString& _rUnoControlModelTypeName, // service name of te model to aggregate
const ::rtl::OUString& _rDefault, // service name of the default control
const sal_Bool _bCommitable, // is the control (model) commitable ?
- const sal_Bool _bSupportExternalBinding, // set to TRUE if you want to support XBindableValue
- const sal_Bool _bSupportsValidation // set to TRUE if you want to support XValidatable
+ const sal_Bool _bSupportExternalBinding, // set to sal_True if you want to support XBindableValue
+ const sal_Bool _bSupportsValidation // set to sal_True if you want to support XValidatable
);
OBoundControlModel(
const OBoundControlModel* _pOriginal, // the original object to clone
diff --git a/forms/source/inc/forms_module.hxx b/forms/source/inc/forms_module.hxx
index 866de89fab6c..0f909a343285 100644
--- a/forms/source/inc/forms_module.hxx
+++ b/forms/source/inc/forms_module.hxx
@@ -102,21 +102,6 @@ namespace FORMS_MODULE_NAMESPACE
static void revokeComponent(
const ::rtl::OUString& _rImplementationName);
- /** write the registration information of all known components
- <p>writes the registration information of all components which are currently registered into the
- specified registry.<p/>
- <p>Usually used from within component_writeInfo.<p/>
- @param _rxServiceManager
- the service manager
- @param _rRootKey
- the registry key under which the information will be stored
- @return
- sal_True if the registration of all implementations was successfull, sal_False otherwise
- */
- static sal_Bool writeComponentInfos(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxServiceManager,
- const ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey >& _rRootKey);
-
/** creates a Factory for the component with the given implementation name.
<p>Usually used from within component_getFactory.<p/>
@param _rxServiceManager
diff --git a/forms/source/inc/forms_module_impl.hxx b/forms/source/inc/forms_module_impl.hxx
index fc3bbafec326..d2bb8f3a8c62 100644
--- a/forms/source/inc/forms_module_impl.hxx
+++ b/forms/source/inc/forms_module_impl.hxx
@@ -108,54 +108,6 @@ namespace FORMS_MODULE_NAMESPACE
}
//--------------------------------------------------------------------------
- sal_Bool OFormsModule::writeComponentInfos(
- const Reference< XMultiServiceFactory >& /*_rxServiceManager*/,
- const Reference< XRegistryKey >& _rxRootKey)
- {
- OSL_ENSURE(_rxRootKey.is(), "OFormsModule::writeComponentInfos : invalid argument !");
-
- if (!s_pImplementationNames)
- {
- OSL_FAIL("OFormsModule::writeComponentInfos : have no class infos ! Are you sure called this method at the right time ?");
- return sal_True;
- }
- OSL_ENSURE(s_pImplementationNames && s_pSupportedServices && s_pCreationFunctionPointers && s_pFactoryFunctionPointers,
- "OFormsModule::writeComponentInfos : inconsistent state (the pointers) !");
- OSL_ENSURE( (s_pImplementationNames->getLength() == s_pSupportedServices->getLength())
- && (s_pImplementationNames->getLength() == s_pCreationFunctionPointers->getLength())
- && (s_pImplementationNames->getLength() == s_pFactoryFunctionPointers->getLength()),
- "OFormsModule::writeComponentInfos : inconsistent state !");
-
- sal_Int32 nLen = s_pImplementationNames->getLength();
- const ::rtl::OUString* pImplName = s_pImplementationNames->getConstArray();
- const Sequence< ::rtl::OUString >* pServices = s_pSupportedServices->getConstArray();
-
- ::rtl::OUString sRootKey("/", 1, RTL_TEXTENCODING_ASCII_US);
- for (sal_Int32 i=0; i<nLen; ++i, ++pImplName, ++pServices)
- {
- ::rtl::OUString aMainKeyName(sRootKey);
- aMainKeyName += *pImplName;
- aMainKeyName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES") );
-
- try
- {
- Reference< XRegistryKey > xNewKey( _rxRootKey->createKey(aMainKeyName) );
-
- const ::rtl::OUString* pService = pServices->getConstArray();
- for (sal_Int32 j=0; j<pServices->getLength(); ++j, ++pService)
- xNewKey->createKey(*pService);
- }
- catch(Exception&)
- {
- OSL_FAIL("OFormsModule::writeComponentInfos : something went wrong while creating the keys !");
- return sal_False;
- }
- }
-
- return sal_True;
- }
-
- //--------------------------------------------------------------------------
Reference< XInterface > OFormsModule::getComponentFactory(
const ::rtl::OUString& _rImplementationName,
const Reference< XMultiServiceFactory >& _rxServiceManager)
diff --git a/forms/source/misc/services.cxx b/forms/source/misc/services.cxx
index ab891083d50e..5c089c4c018d 100644
--- a/forms/source/misc/services.cxx
+++ b/forms/source/misc/services.cxx
@@ -284,22 +284,6 @@ void ensureClassInfos()
}
-//---------------------------------------------------------------------------------------
-void registerServiceProvider(const ::rtl::OUString& _rServiceImplName, const Sequence< ::rtl::OUString >& _rServices, XRegistryKey* _pKey)
-{
- ::rtl::OUString sMainKeyName (RTL_CONSTASCII_USTRINGPARAM("/") );
- sMainKeyName += _rServiceImplName;
- sMainKeyName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES") );
- Reference< XRegistryKey > xNewKey = _pKey->createKey(sMainKeyName);
- OSL_ENSURE(xNewKey.is(), "forms::registerProvider : could not create a registry key !");
- if (!xNewKey.is())
- return;
-
- const ::rtl::OUString* pSupportedServices = _rServices.getConstArray();
- for (sal_Int32 i=0; i<_rServices.getLength(); ++i, ++pSupportedServices)
- xNewKey->createKey(*pSupportedServices);
-}
-
//=======================================================================================
extern "C"
{
@@ -343,57 +327,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(const
}
//---------------------------------------------------------------------------------------
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(void* _pServiceManager, XRegistryKey* _pRegistryKey)
-{
- if (_pRegistryKey)
- {
- try
- {
- // ========================================================================
- // the real way - use the OModule
- createRegistryInfo_FORMS();
- if ( !::frm::OFormsModule::writeComponentInfos(
- static_cast<XMultiServiceFactory*>( _pServiceManager ),
- static_cast<XRegistryKey*>( _pRegistryKey ) )
- )
- return sal_False;
-
- // ========================================================================
- // a lot of stuff which is implemented "manually" here in this file
-
- // collect the class infos
- ensureClassInfos();
-
- // both our static sequences should have the same length ...
- sal_Int32 nClasses = s_aClassImplementationNames.getLength();
- OSL_ENSURE(s_aClassServiceNames.getLength() == nClasses,
- "forms::component_writeInfo : invalid class infos !");
-
- // loop through the sequences and register the service providers
- const ::rtl::OUString* pClasses = s_aClassImplementationNames.getConstArray();
- const Sequence< ::rtl::OUString >* pServices = s_aClassServiceNames.getConstArray();
-
- for (sal_Int32 i=0; i<nClasses; ++i, ++pClasses, ++pServices)
- registerServiceProvider(*pClasses, *pServices, _pRegistryKey);
-
- s_aClassImplementationNames.realloc(0);
- s_aClassServiceNames.realloc(0);
- s_aFactories.realloc(0);
-
- return sal_True;
- }
- catch ( InvalidRegistryException& )
- {
- OSL_ENSURE(sal_False, "forms::component_writeInfo : InvalidRegistryException !");
- }
- }
- s_aClassImplementationNames.realloc(0);
- s_aClassServiceNames.realloc(0);
- s_aFactories.realloc(0);
- return sal_False;
-}
-
-//---------------------------------------------------------------------------------------
SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(const sal_Char* _pImplName, XMultiServiceFactory* _pServiceManager, void* /*_pRegistryKey*/)
{
if (!_pServiceManager || !_pImplName)
diff --git a/forms/source/richtext/clipboarddispatcher.cxx b/forms/source/richtext/clipboarddispatcher.cxx
index 02a44fef4c42..52069085ed2c 100644
--- a/forms/source/richtext/clipboarddispatcher.cxx
+++ b/forms/source/richtext/clipboarddispatcher.cxx
@@ -156,7 +156,7 @@ namespace frm
{
m_pClipListener = new TransferableClipboardListener( LINK( this, OPasteClipboardDispatcher, OnClipboardChanged ) );
m_pClipListener->acquire();
- m_pClipListener->AddRemoveListener( _rView.GetWindow(), TRUE );
+ m_pClipListener->AddRemoveListener( _rView.GetWindow(), sal_True );
// initial state
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( _rView.GetWindow() ) );
@@ -190,7 +190,7 @@ namespace frm
{
OSL_ENSURE( getEditView() && getEditView()->GetWindow(), "OPasteClipboardDispatcher::disposing: EditView should not (yet) be disfunctional here!" );
if ( getEditView() && getEditView()->GetWindow() && m_pClipListener )
- m_pClipListener->AddRemoveListener( getEditView()->GetWindow(), FALSE );
+ m_pClipListener->AddRemoveListener( getEditView()->GetWindow(), sal_False );
m_pClipListener->release();
m_pClipListener = NULL;
diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx
index c6345a25ece0..42f6dad4ca41 100644
--- a/forms/source/richtext/richtextcontrol.cxx
+++ b/forms/source/richtext/richtextcontrol.cxx
@@ -108,7 +108,7 @@ namespace frm
DBG_NAME( ORichTextControl )
//------------------------------------------------------------------
ORichTextControl::ORichTextControl( const Reference< XMultiServiceFactory >& _rxORB )
- :m_xORB( _rxORB )
+ :UnoEditControl( _rxORB )
{
DBG_CTOR( ORichTextControl, NULL );
}
diff --git a/forms/source/richtext/richtextcontrol.hxx b/forms/source/richtext/richtextcontrol.hxx
index ad16b0fc9c42..99753d14ceba 100644
--- a/forms/source/richtext/richtextcontrol.hxx
+++ b/forms/source/richtext/richtextcontrol.hxx
@@ -38,7 +38,7 @@
#include <comphelper/uno3.hxx>
#include <comphelper/implementationreference.hxx>
#include <cppuhelper/implbase1.hxx>
-#include <vcl/wintypes.hxx>
+#include <tools/wintypes.hxx>
#include "rtattributes.hxx"
#include "attributedispatcher.hxx"
@@ -60,10 +60,6 @@ namespace frm
class ORichTextControl :public UnoEditControl
,public ORichTextControl_Base
{
- private:
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
- m_xORB;
-
public:
ORichTextControl(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
diff --git a/forms/source/richtext/richtextengine.cxx b/forms/source/richtext/richtextengine.cxx
index a627c6d0e4e3..4b210e7ede60 100644
--- a/forms/source/richtext/richtextengine.cxx
+++ b/forms/source/richtext/richtextengine.cxx
@@ -39,7 +39,7 @@
#define ITEMID_LANGUAGE EE_CHAR_LANGUAGE
#include <editeng/langitem.hxx>
#include <vcl/svapp.hxx>
-#include <vcl/mapunit.hxx>
+#include <tools/mapunit.hxx>
#include <vcl/mapmod.hxx>
#include <vcl/outdev.hxx>
#include <unotools/lingucfg.hxx>
diff --git a/forms/source/richtext/richtextimplcontrol.cxx b/forms/source/richtext/richtextimplcontrol.cxx
index 244291bc81f9..c0c6fe2a7cdd 100644
--- a/forms/source/richtext/richtextimplcontrol.cxx
+++ b/forms/source/richtext/richtextimplcontrol.cxx
@@ -41,7 +41,7 @@
#include <editeng/editobj.hxx>
#include <svl/itempool.hxx>
#include <svl/itemset.hxx>
-#include <vcl/mapunit.hxx>
+#include <tools/mapunit.hxx>
#include <vcl/window.hxx>
#include <vcl/svapp.hxx>
@@ -88,7 +88,7 @@ namespace frm
m_pEngine->registerEngineStatusListener( this );
{
- ULONG nViewControlWord = m_pView->GetControlWord();
+ sal_uLong nViewControlWord = m_pView->GetControlWord();
nViewControlWord |= EV_CNTRL_AUTOSCROLL;
m_pView->SetControlWord( nViewControlWord );
}
@@ -235,7 +235,7 @@ namespace frm
//--------------------------------------------------------------------
void RichTextControlImpl::normalizeScriptDependentAttribute( SvxScriptSetItem& _rScriptSetItem )
{
- _rScriptSetItem.GetItemSet().Put( m_pView->GetAttribs(), FALSE );
+ _rScriptSetItem.GetItemSet().Put( m_pView->GetAttribs(), sal_False );
const SfxPoolItem* pNormalizedItem = _rScriptSetItem.GetItemOfScript( getSelectedScriptType() );
WhichId nNormalizedWhichId = _rScriptSetItem.GetItemSet().GetPool()->GetWhich( _rScriptSetItem.Which() );
@@ -290,7 +290,7 @@ namespace frm
//--------------------------------------------------------------------
void RichTextControlImpl::EditEngineStatusChanged( const EditStatus& _rStatus )
{
- ULONG nStatusWord( _rStatus.GetStatusWord() );
+ sal_uLong nStatusWord( _rStatus.GetStatusWord() );
if ( ( nStatusWord & EE_STAT_TEXTWIDTHCHANGED )
|| ( nStatusWord & EE_STAT_TEXTHEIGHTCHANGED )
)
@@ -588,7 +588,7 @@ namespace frm
}
//--------------------------------------------------------------------
- void RichTextControlImpl::Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, ULONG /*_nFlags*/ )
+ void RichTextControlImpl::Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, sal_uLong /*_nFlags*/ )
{
// need to normalize the map mode of the device - every paint operation on any device needs
// to use the same map mode
@@ -642,7 +642,7 @@ namespace frm
lcl_inflate( aPlayground, -aOnePixel.Width(), -aOnePixel.Height() );
// actually draw the content
- m_pEngine->Draw( _pDev, aPlayground, Point(), TRUE );
+ m_pEngine->Draw( _pDev, aPlayground, Point(), sal_True );
_pDev->Pop();
}
diff --git a/forms/source/richtext/richtextimplcontrol.hxx b/forms/source/richtext/richtextimplcontrol.hxx
index a79efcf1b89d..4cec7242279b 100644
--- a/forms/source/richtext/richtextimplcontrol.hxx
+++ b/forms/source/richtext/richtextimplcontrol.hxx
@@ -153,7 +153,7 @@ namespace frm
bool GetHideInactiveSelection() const;
/// draws the control onto a given output device
- void Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, ULONG _nFlags );
+ void Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, sal_uLong _nFlags );
/// handles command events arrived at the anti-impl control
long HandleCommand( const CommandEvent& _rEvent );
diff --git a/forms/source/richtext/richtextmodel.cxx b/forms/source/richtext/richtextmodel.cxx
index 42accca83e79..e38757211fe6 100644
--- a/forms/source/richtext/richtextmodel.cxx
+++ b/forms/source/richtext/richtextmodel.cxx
@@ -158,7 +158,7 @@ namespace frm
{
m_pEngine->SetModifyHdl( LINK( this, ORichTextModel, OnEngineContentModified ) );
- ULONG nEngineControlWord = m_pEngine->GetControlWord();
+ sal_uLong nEngineControlWord = m_pEngine->GetControlWord();
nEngineControlWord = nEngineControlWord & ~EE_CNTRL_AUTOPAGESIZE;
m_pEngine->SetControlWord( nEngineControlWord );
diff --git a/forms/source/richtext/richtextunowrapper.cxx b/forms/source/richtext/richtextunowrapper.cxx
index fd1e5cc74e5a..2077b43756a8 100644
--- a/forms/source/richtext/richtextunowrapper.cxx
+++ b/forms/source/richtext/richtextunowrapper.cxx
@@ -119,8 +119,8 @@ namespace frm
{
// this means that the content of the EditEngine changed via the UNO API
// to reflect this in the views, we need to update them
- USHORT viewCount = m_rEngine.GetViewCount();
- for ( USHORT view = 0; view < viewCount; ++view )
+ sal_uInt16 viewCount = m_rEngine.GetViewCount();
+ for ( sal_uInt16 view = 0; view < viewCount; ++view )
{
EditView* pView = m_rEngine.GetView( view );
if ( pView )
diff --git a/forms/source/richtext/richtextvclcontrol.cxx b/forms/source/richtext/richtextvclcontrol.cxx
index 53e7d9091f80..d5b9d560dd3f 100644
--- a/forms/source/richtext/richtextvclcontrol.cxx
+++ b/forms/source/richtext/richtextvclcontrol.cxx
@@ -84,7 +84,7 @@ namespace frm
void RichTextControl::implInit( RichTextEngine* _pEngine, ITextAttributeListener* _pTextAttribListener, ITextSelectionListener* _pSelectionListener )
{
m_pImpl = new RichTextControlImpl( this, _pEngine, _pTextAttribListener, _pSelectionListener );
- SetCompoundControl( TRUE );
+ SetCompoundControl( sal_True );
}
//--------------------------------------------------------------------
@@ -119,8 +119,8 @@ namespace frm
if ( HasChildPathFocus() )
getView().HideCursor();
- BOOL bOldUpdateMode = getEngine().GetUpdateMode(); // TODO: guard?
- getEngine().SetUpdateMode( FALSE );
+ sal_Bool bOldUpdateMode = getEngine().GetUpdateMode(); // TODO: guard?
+ getEngine().SetUpdateMode( sal_False );
getView().SetAttribs( _rAttributesToApply );
@@ -321,7 +321,7 @@ namespace frm
}
//--------------------------------------------------------------------
- void RichTextControl::Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, ULONG _nFlags )
+ void RichTextControl::Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, sal_uLong _nFlags )
{
m_pImpl->Draw( _pDev, _rPos, _rSize, _nFlags );
}
diff --git a/forms/source/richtext/richtextvclcontrol.hxx b/forms/source/richtext/richtextvclcontrol.hxx
index 4ea84a925519..b69a31c593e0 100644
--- a/forms/source/richtext/richtextvclcontrol.hxx
+++ b/forms/source/richtext/richtextvclcontrol.hxx
@@ -114,7 +114,7 @@ namespace frm
EditView& getView();
// Window overridables
- virtual void Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, ULONG _nFlags );
+ virtual void Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, sal_uLong _nFlags );
protected:
// Window overridables
diff --git a/forms/source/richtext/richtextviewport.cxx b/forms/source/richtext/richtextviewport.cxx
index 5d6bff8e85bb..4c5a05b7e3d7 100644
--- a/forms/source/richtext/richtextviewport.cxx
+++ b/forms/source/richtext/richtextviewport.cxx
@@ -64,7 +64,7 @@ namespace frm
{
Control::GetFocus();
m_pView->SetSelectionMode( EE_SELMODE_STD );
- m_pView->ShowCursor( TRUE );
+ m_pView->ShowCursor( sal_True );
}
//--------------------------------------------------------------------
diff --git a/forms/source/richtext/rtattributehandler.cxx b/forms/source/richtext/rtattributehandler.cxx
index 3b43f137ab6a..157f3b1244a5 100644
--- a/forms/source/richtext/rtattributehandler.cxx
+++ b/forms/source/richtext/rtattributehandler.cxx
@@ -34,7 +34,7 @@
#include <editeng/eeitem.hxx>
#include <svl/itemset.hxx>
#include <svl/itempool.hxx>
-#include <vcl/mapunit.hxx>
+#include <tools/mapunit.hxx>
#include <vcl/mapmod.hxx>
#include <vcl/outdev.hxx>
@@ -121,7 +121,7 @@ namespace frm
{
SvxScriptSetItem aSetItem( (WhichId)getAttributeId(), *_rAttribs.GetPool() );
aSetItem.PutItemForScriptType( _nForScriptType, _rItem );
- _rAttribs.Put( aSetItem.GetItemSet(), FALSE );
+ _rAttribs.Put( aSetItem.GetItemSet(), sal_False );
}
//--------------------------------------------------------------------
@@ -275,7 +275,7 @@ namespace frm
AttributeCheckState LineSpacingHandler::implGetCheckState( const SfxPoolItem& _rItem ) const
{
OSL_ENSURE( _rItem.ISA( SvxLineSpacingItem ), "LineSpacingHandler::implGetCheckState: invalid pool item!" );
- USHORT nLineSpace = static_cast< const SvxLineSpacingItem& >( _rItem ).GetPropLineSpace();
+ sal_uInt16 nLineSpace = static_cast< const SvxLineSpacingItem& >( _rItem ).GetPropLineSpace();
return ( nLineSpace == m_nLineSpace ) ? eChecked : eUnchecked;
}
@@ -290,7 +290,7 @@ namespace frm
if ( 100 == m_nLineSpace )
aLineSpacing.GetInterLineSpaceRule() = SVX_INTER_LINE_SPACE_OFF;
else
- aLineSpacing.SetPropLineSpace( (BYTE)m_nLineSpace );
+ aLineSpacing.SetPropLineSpace( (sal_uInt8)m_nLineSpace );
_rNewAttribs.Put( aLineSpacing );
}
@@ -398,7 +398,7 @@ namespace frm
if ( pFontHeightItem )
{
// by definition, the item should have the unit twip
- ULONG nHeight = pFontHeightItem->GetHeight();
+ sal_uLong nHeight = pFontHeightItem->GetHeight();
if ( _rAttribs.GetPool()->GetMetric( getWhich() ) != SFX_MAPUNIT_TWIP )
{
nHeight = OutputDevice::LogicToLogic(
@@ -426,7 +426,7 @@ namespace frm
{
// corect measurement units
SfxMapUnit eItemMapUnit = pFontHeightItem->GetPropUnit(); (void)eItemMapUnit;
- ULONG nHeight = pFontHeightItem->GetHeight();
+ sal_uLong nHeight = pFontHeightItem->GetHeight();
if ( _rNewAttribs.GetPool()->GetMetric( getWhich() ) != SFX_MAPUNIT_TWIP )
{
nHeight = OutputDevice::LogicToLogic(
@@ -487,7 +487,7 @@ namespace frm
// then we toggle the adjustment, too
SvxAdjust eCurrentAdjustment = SVX_ADJUST_LEFT;
const SfxPoolItem* pCurrentAdjustment = NULL;
- if ( SFX_ITEM_ON == _rCurrentAttribs.GetItemState( EE_PARA_JUST, TRUE, &pCurrentAdjustment ) )
+ if ( SFX_ITEM_ON == _rCurrentAttribs.GetItemState( EE_PARA_JUST, sal_True, &pCurrentAdjustment ) )
eCurrentAdjustment = static_cast< const SvxAdjustItem* >( pCurrentAdjustment )->GetAdjust();
if ( eCurrentAdjustment == m_eOppositeDefaultAdjustment )
diff --git a/forms/source/richtext/rtattributehandler.hxx b/forms/source/richtext/rtattributehandler.hxx
index 87e192032c38..e908ae75162c 100644
--- a/forms/source/richtext/rtattributehandler.hxx
+++ b/forms/source/richtext/rtattributehandler.hxx
@@ -147,7 +147,7 @@ namespace frm
class LineSpacingHandler : public AttributeHandler
{
private:
- USHORT m_nLineSpace;
+ sal_uInt16 m_nLineSpace;
public:
LineSpacingHandler( AttributeId _nAttributeId );
diff --git a/forms/source/richtext/rtattributes.hxx b/forms/source/richtext/rtattributes.hxx
index c15eca82f587..246a1366e283 100644
--- a/forms/source/richtext/rtattributes.hxx
+++ b/forms/source/richtext/rtattributes.hxx
@@ -44,11 +44,11 @@ namespace frm
/// the id of an attribute
typedef sal_Int32 AttributeId;
/// the "which id" of an item in an SfxItemSet
- typedef USHORT WhichId;
+ typedef sal_uInt16 WhichId;
/// a SFX slot id
- typedef USHORT SfxSlotId;
+ typedef sal_uInt16 SfxSlotId;
/// a script type
- typedef USHORT ScriptType;
+ typedef sal_uInt16 ScriptType;
//====================================================================
//= AttributeCheckState
diff --git a/forms/source/richtext/specialdispatchers.cxx b/forms/source/richtext/specialdispatchers.cxx
index aeb4427b5aaf..d384a670a2cd 100644
--- a/forms/source/richtext/specialdispatchers.cxx
+++ b/forms/source/richtext/specialdispatchers.cxx
@@ -79,10 +79,10 @@ namespace frm
if ( !pEngine )
return;
- USHORT nParagraphs = pEngine->GetParagraphCount();
+ sal_uInt16 nParagraphs = pEngine->GetParagraphCount();
if ( nParagraphs )
{
- USHORT nLastParaNumber = nParagraphs - 1;
+ sal_uInt16 nLastParaNumber = nParagraphs - 1;
xub_StrLen nParaLen = pEngine->GetTextLen( nLastParaNumber );
getEditView()->SetSelection( ESelection( 0, 0, nLastParaNumber, nParaLen ) );
}
diff --git a/forms/source/solar/component/navbarcontrol.cxx b/forms/source/solar/component/navbarcontrol.cxx
index 673501803f29..f0e552d79fba 100644
--- a/forms/source/solar/component/navbarcontrol.cxx
+++ b/forms/source/solar/component/navbarcontrol.cxx
@@ -107,7 +107,7 @@ namespace frm
DBG_NAME( ONavigationBarControl )
//------------------------------------------------------------------
ONavigationBarControl::ONavigationBarControl( const Reference< XMultiServiceFactory >& _rxORB )
- :m_xORB( _rxORB )
+ :UnoControl( _rxORB )
{
DBG_CTOR( ONavigationBarControl, NULL );
}
@@ -182,7 +182,7 @@ namespace frm
}
// create the peer
- ONavigationBarPeer* pPeer = ONavigationBarPeer::Create( m_xORB, pParentWin, getModel() );
+ ONavigationBarPeer* pPeer = ONavigationBarPeer::Create( maContext.getLegacyServiceFactory(), pParentWin, getModel() );
DBG_ASSERT( pPeer, "ONavigationBarControl::createPeer: invalid peer returned!" );
if ( pPeer )
// by definition, the returned component is aquired once
@@ -301,7 +301,7 @@ namespace frm
MouseSettings aMouseSettings = aSettings.GetMouseSettings();
aMouseSettings.SetButtonRepeat( 10 );
aSettings.SetMouseSettings( aMouseSettings );
- pNavBar->SetSettings( aSettings, TRUE );
+ pNavBar->SetSettings( aSettings, sal_True );
// outta here
return pPeer;
diff --git a/forms/source/solar/component/navbarcontrol.hxx b/forms/source/solar/component/navbarcontrol.hxx
index 864ff225e8de..33becc6476de 100644
--- a/forms/source/solar/component/navbarcontrol.hxx
+++ b/forms/source/solar/component/navbarcontrol.hxx
@@ -40,7 +40,7 @@
#include <toolkit/awt/vclxwindow.hxx>
#include <comphelper/uno3.hxx>
#include <cppuhelper/implbase1.hxx>
-#include <vcl/wintypes.hxx>
+#include <tools/wintypes.hxx>
//.........................................................................
namespace frm
@@ -57,10 +57,6 @@ namespace frm
:public UnoControl
,public ONavigationBarControl_Base
{
- private:
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
- m_xORB;
-
public:
ONavigationBarControl(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx
index b408b7052578..f87cd2c9d3a6 100644
--- a/forms/source/solar/control/navtoolbar.cxx
+++ b/forms/source/solar/control/navtoolbar.cxx
@@ -66,7 +66,7 @@ namespace frm
|| ( _nFeatureId == LID_RECORD_FILLER );
}
- static String getLabelString( USHORT _nResId )
+ static String getLabelString( sal_uInt16 _nResId )
{
String sLabel = String::CreateFromAscii( " " );
sLabel += String( FRM_RES_STRING( _nResId ) );
@@ -197,9 +197,9 @@ namespace frm
//---------------------------------------------------------------------
void NavigationToolBar::updateFeatureStates( )
{
- for ( USHORT nPos = 0; nPos < m_pToolbar->GetItemCount(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < m_pToolbar->GetItemCount(); ++nPos )
{
- USHORT nItemId = m_pToolbar->GetItemId( nPos );
+ sal_uInt16 nItemId = m_pToolbar->GetItemId( nPos );
if ( ( nItemId == LID_RECORD_LABEL ) || ( nItemId == LID_RECORD_FILLER ) )
continue;
@@ -211,7 +211,7 @@ namespace frm
}
//---------------------------------------------------------------------
- void NavigationToolBar::implEnableItem( USHORT _nItemId, bool _bEnabled )
+ void NavigationToolBar::implEnableItem( sal_uInt16 _nItemId, bool _bEnabled )
{
m_pToolbar->EnableItem( _nItemId, _bEnabled );
@@ -225,32 +225,32 @@ namespace frm
//---------------------------------------------------------------------
void NavigationToolBar::enableFeature( sal_Int16 _nFeatureId, bool _bEnabled )
{
- DBG_ASSERT( m_pToolbar->GetItemPos( (USHORT)_nFeatureId ) != TOOLBOX_ITEM_NOTFOUND,
+ DBG_ASSERT( m_pToolbar->GetItemPos( (sal_uInt16)_nFeatureId ) != TOOLBOX_ITEM_NOTFOUND,
"NavigationToolBar::enableFeature: invalid id!" );
- implEnableItem( (USHORT)_nFeatureId, _bEnabled );
+ implEnableItem( (sal_uInt16)_nFeatureId, _bEnabled );
}
//---------------------------------------------------------------------
void NavigationToolBar::checkFeature( sal_Int16 _nFeatureId, bool _bEnabled )
{
- DBG_ASSERT( m_pToolbar->GetItemPos( (USHORT)_nFeatureId ) != TOOLBOX_ITEM_NOTFOUND,
+ DBG_ASSERT( m_pToolbar->GetItemPos( (sal_uInt16)_nFeatureId ) != TOOLBOX_ITEM_NOTFOUND,
"NavigationToolBar::checkFeature: invalid id!" );
- m_pToolbar->CheckItem( (USHORT)_nFeatureId, _bEnabled );
+ m_pToolbar->CheckItem( (sal_uInt16)_nFeatureId, _bEnabled );
}
//---------------------------------------------------------------------
void NavigationToolBar::setFeatureText( sal_Int16 _nFeatureId, const ::rtl::OUString& _rText )
{
- DBG_ASSERT( m_pToolbar->GetItemPos( (USHORT)_nFeatureId ) != TOOLBOX_ITEM_NOTFOUND,
+ DBG_ASSERT( m_pToolbar->GetItemPos( (sal_uInt16)_nFeatureId ) != TOOLBOX_ITEM_NOTFOUND,
"NavigationToolBar::checkFeature: invalid id!" );
- Window* pItemWindow = m_pToolbar->GetItemWindow( (USHORT)_nFeatureId );
+ Window* pItemWindow = m_pToolbar->GetItemWindow( (sal_uInt16)_nFeatureId );
if ( pItemWindow )
pItemWindow->SetText( _rText );
else
- m_pToolbar->SetItemText( (USHORT)_nFeatureId, _rText );
+ m_pToolbar->SetItemText( (sal_uInt16)_nFeatureId, _rText );
}
//---------------------------------------------------------------------
@@ -266,7 +266,7 @@ namespace frm
struct FeatureDescription
{
- USHORT nId;
+ sal_uInt16 nId;
bool bRepeat;
bool bItemWindow;
} aSupportedFeatures[] =
@@ -333,7 +333,7 @@ namespace frm
{
pItemWindow = new FixedText( m_pToolbar, WB_VCENTER );
pItemWindow->SetBackground();
- pItemWindow->SetPaintTransparent(TRUE);
+ pItemWindow->SetPaintTransparent(sal_True);
}
m_aChildWins.push_back( pItemWindow );
@@ -369,16 +369,16 @@ namespace frm
if ( !m_pImageProvider )
return;
- const USHORT nItemCount = m_pToolbar->GetItemCount();
+ const sal_uInt16 nItemCount = m_pToolbar->GetItemCount();
// collect the FormFeatures in the toolbar
typedef ::std::vector< sal_Int16 > FormFeatures;
FormFeatures aFormFeatures;
aFormFeatures.reserve( nItemCount );
- for ( USHORT i=0; i<nItemCount; ++i )
+ for ( sal_uInt16 i=0; i<nItemCount; ++i )
{
- USHORT nId = m_pToolbar->GetItemId( i );
+ sal_uInt16 nId = m_pToolbar->GetItemId( i );
if ( ( TOOLBOXITEM_BUTTON == m_pToolbar->GetItemType( i ) ) && !isArtificialItem( nId ) )
aFormFeatures.push_back( nId );
}
@@ -429,13 +429,13 @@ namespace frm
//---------------------------------------------------------------------
void NavigationToolBar::ShowFunctionGroup( FunctionGroup _eGroup, bool _bShow )
{
- const USHORT* pGroupIds = NULL;
+ const sal_uInt16* pGroupIds = NULL;
switch ( _eGroup )
{
case ePosition:
{
- static const USHORT aPositionIds[] = {
+ static const sal_uInt16 aPositionIds[] = {
LID_RECORD_LABEL, FormFeature::MoveAbsolute, LID_RECORD_FILLER, FormFeature::TotalRecords, 0
};
pGroupIds = aPositionIds;
@@ -443,7 +443,7 @@ namespace frm
break;
case eNavigation:
{
- static const USHORT aNavigationIds[] = {
+ static const sal_uInt16 aNavigationIds[] = {
FormFeature::MoveToFirst, FormFeature::MoveToPrevious, FormFeature::MoveToNext, FormFeature::MoveToLast, FormFeature::MoveToInsertRow, 0
};
pGroupIds = aNavigationIds;
@@ -451,7 +451,7 @@ namespace frm
break;
case eRecordActions:
{
- static const USHORT aActionIds[] = {
+ static const sal_uInt16 aActionIds[] = {
FormFeature::SaveRecordChanges, FormFeature::UndoRecordChanges, FormFeature::DeleteRecord, FormFeature::ReloadForm, FormFeature::RefreshCurrentControl, 0
};
pGroupIds = aActionIds;
@@ -459,7 +459,7 @@ namespace frm
break;
case eFilterSort:
{
- static const USHORT aFilterSortIds[] = {
+ static const sal_uInt16 aFilterSortIds[] = {
FormFeature::SortAscending, FormFeature::SortDescending, FormFeature::InteractiveSort, FormFeature::AutoFilter, FormFeature::InteractiveFilter, FormFeature::ToggleApplyFilter, FormFeature::RemoveFilterAndSort, 0
};
pGroupIds = aFilterSortIds;
@@ -477,7 +477,7 @@ namespace frm
//---------------------------------------------------------------------
bool NavigationToolBar::IsFunctionGroupVisible( FunctionGroup _eGroup )
{
- USHORT nIndicatorItem = 0;
+ sal_uInt16 nIndicatorItem = 0;
switch ( _eGroup )
{
case ePosition : nIndicatorItem = LID_RECORD_LABEL; break;
@@ -516,7 +516,7 @@ namespace frm
case STATE_CHANGE_MIRRORING:
{
- BOOL bIsRTLEnabled( IsRTLEnabled() );
+ sal_Bool bIsRTLEnabled( IsRTLEnabled() );
m_pToolbar->EnableRTL( bIsRTLEnabled );
forEachItemWindow( &NavigationToolBar::enableItemRTL, &bIsRTLEnabled );
Resize();
@@ -577,9 +577,9 @@ namespace frm
//---------------------------------------------------------------------
void NavigationToolBar::forEachItemWindow( ItemWindowHandler _handler, const void* _pParam )
{
- for ( USHORT item = 0; item < m_pToolbar->GetItemCount(); ++item )
+ for ( sal_uInt16 item = 0; item < m_pToolbar->GetItemCount(); ++item )
{
- USHORT nItemId = m_pToolbar->GetItemId( item );
+ sal_uInt16 nItemId = m_pToolbar->GetItemId( item );
Window* pItemWindow = m_pToolbar->GetItemWindow( nItemId );
if ( pItemWindow )
(this->*_handler)( nItemId, pItemWindow, _pParam );
@@ -587,7 +587,7 @@ namespace frm
}
//---------------------------------------------------------------------
- void NavigationToolBar::setItemBackground( USHORT /* _nItemId */, Window* _pItemWindow, const void* _pColor ) const
+ void NavigationToolBar::setItemBackground( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* _pColor ) const
{
if ( _pColor )
_pItemWindow->SetControlBackground( *static_cast< const Color* >( _pColor ) );
@@ -596,7 +596,7 @@ namespace frm
}
//---------------------------------------------------------------------
- void NavigationToolBar::setTextLineColor( USHORT /* _nItemId */, Window* _pItemWindow, const void* _pColor ) const
+ void NavigationToolBar::setTextLineColor( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* _pColor ) const
{
if ( _pColor )
_pItemWindow->SetTextLineColor( *static_cast< const Color* >( _pColor ) );
@@ -605,14 +605,14 @@ namespace frm
}
#if 0
//---------------------------------------------------------------------
- void NavigationToolBar::setItemWindowZoom( USHORT /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const
+ void NavigationToolBar::setItemWindowZoom( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const
{
_pItemWindow->SetZoom( GetZoom() );
_pItemWindow->SetZoomedPointFont( IsControlFont() ? GetControlFont() : GetPointFont() );
}
#endif
//---------------------------------------------------------------------
- void NavigationToolBar::setItemControlFont( USHORT /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const
+ void NavigationToolBar::setItemControlFont( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const
{
if ( IsControlFont() )
_pItemWindow->SetControlFont( GetControlFont() );
@@ -621,7 +621,7 @@ namespace frm
}
//---------------------------------------------------------------------
- void NavigationToolBar::setItemControlForeground( USHORT /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const
+ void NavigationToolBar::setItemControlForeground( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const
{
if ( IsControlForeground() )
_pItemWindow->SetControlForeground( GetControlForeground() );
@@ -631,7 +631,7 @@ namespace frm
}
//---------------------------------------------------------------------
- void NavigationToolBar::adjustItemWindowWidth( USHORT _nItemId, Window* _pItemWindow, const void* /* _pParam */ ) const
+ void NavigationToolBar::adjustItemWindowWidth( sal_uInt16 _nItemId, Window* _pItemWindow, const void* /* _pParam */ ) const
{
String sItemText;
switch ( _nItemId )
@@ -661,9 +661,9 @@ namespace frm
}
//---------------------------------------------------------------------
- void NavigationToolBar::enableItemRTL( USHORT /*_nItemId*/, Window* _pItemWindow, const void* _pIsRTLEnabled ) const
+ void NavigationToolBar::enableItemRTL( sal_uInt16 /*_nItemId*/, Window* _pItemWindow, const void* _pIsRTLEnabled ) const
{
- _pItemWindow->EnableRTL( *static_cast< const BOOL* >( _pIsRTLEnabled ) );
+ _pItemWindow->EnableRTL( *static_cast< const sal_Bool* >( _pIsRTLEnabled ) );
}
//=====================================================================
@@ -678,7 +678,7 @@ namespace frm
SetFirst( 1 );
SetSpinSize( 1 );
SetDecimalDigits( 0 );
- SetStrictFormat( TRUE );
+ SetStrictFormat( sal_True );
SetBorderStyle( WINDOW_BORDER_MONO );
}
diff --git a/forms/source/solar/inc/navtoolbar.hxx b/forms/source/solar/inc/navtoolbar.hxx
index 03343e5d2d8b..0cc1a1c2cfd7 100644
--- a/forms/source/solar/inc/navtoolbar.hxx
+++ b/forms/source/solar/inc/navtoolbar.hxx
@@ -142,25 +142,25 @@ namespace frm
void implUpdateImages();
/// enables or disables an item, plus possible dependent items
- void implEnableItem( USHORT _nItemId, bool _bEnabled );
+ void implEnableItem( sal_uInt16 _nItemId, bool _bEnabled );
/** update the states of all features, using the callback
*/
void updateFeatureStates( );
// iterating through item windows
- typedef void (NavigationToolBar::*ItemWindowHandler) (USHORT, Window*, const void*) const;
+ typedef void (NavigationToolBar::*ItemWindowHandler) (sal_uInt16, Window*, const void*) const;
void forEachItemWindow( ItemWindowHandler _handler, const void* _pParam );
- void setItemBackground( USHORT /* _nItemId */, Window* _pItemWindow, const void* _pColor ) const;
- void setTextLineColor( USHORT /* _nItemId */, Window* _pItemWindow, const void* _pColor ) const;
+ void setItemBackground( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* _pColor ) const;
+ void setTextLineColor( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* _pColor ) const;
#if 0
- void setItemWindowZoom( USHORT /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const;
+ void setItemWindowZoom( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const;
#endif
- void setItemControlFont( USHORT /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const;
- void setItemControlForeground( USHORT /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const;
- void adjustItemWindowWidth( USHORT _nItemId, Window* _pItemWindow, const void* /* _pParam */ ) const;
- void enableItemRTL( USHORT /*_nItemId*/, Window* _pItemWindow, const void* _pIsRTLEnabled ) const;
+ void setItemControlFont( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const;
+ void setItemControlForeground( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const;
+ void adjustItemWindowWidth( sal_uInt16 _nItemId, Window* _pItemWindow, const void* /* _pParam */ ) const;
+ void enableItemRTL( sal_uInt16 /*_nItemId*/, Window* _pItemWindow, const void* _pIsRTLEnabled ) const;
};
//=====================================================================
diff --git a/forms/source/xforms/xpathlib/xpathlib.cxx b/forms/source/xforms/xpathlib/xpathlib.cxx
index 9a6f59a1592f..8b12aebd5204 100644
--- a/forms/source/xforms/xpathlib/xpathlib.cxx
+++ b/forms/source/xforms/xpathlib/xpathlib.cxx
@@ -328,7 +328,7 @@ static sal_Bool parseDateTime(const ::rtl::OUString& aString, DateTime& aDateTim
sal_Int32 nMinute = aTimeString.getToken(0, ':', nIndex).toInt32();
sal_Int32 nSecond = aTimeString.getToken(0, ':', nIndex).toInt32();
- Date tmpDate((USHORT)nDay, (USHORT)nMonth, (USHORT)nYear);
+ Date tmpDate((sal_uInt16)nDay, (sal_uInt16)nMonth, (sal_uInt16)nYear);
Time tmpTime(nHour, nMinute, nSecond);
DateTime tmpDateTime(tmpDate, tmpTime);
if (aString.indexOf(aUTCString) < 0)
diff --git a/forms/util/frm.component b/forms/util/frm.component
new file mode 100644
index 000000000000..c727e805940a
--- /dev/null
+++ b/forms/util/frm.component
@@ -0,0 +1,255 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.form.ONavigationBarControl">
+ <service name="com.sun.star.form.control.NavigationToolBar"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.form.ONavigationBarModel">
+ <service name="com.sun.star.form.FormComponent"/>
+ <service name="com.sun.star.form.FormControlModel"/>
+ <service name="com.sun.star.form.component.NavigationToolBar"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.form.ORichTextControl">
+ <service name="com.sun.star.form.control.RichTextControl"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.forms.FormOperations">
+ <service name="com.sun.star.form.runtime.FormOperations"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.forms.ODatabaseForm">
+ <service name="com.sun.star.form.FormComponent"/>
+ <service name="com.sun.star.form.FormComponents"/>
+ <service name="com.sun.star.form.component.DataForm"/>
+ <service name="com.sun.star.form.component.Form"/>
+ <service name="com.sun.star.form.component.HTMLForm"/>
+ <service name="stardiv.one.form.component.Form"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.forms.OFilterControl">
+ <service name="com.sun.star.awt.UnoControl"/>
+ <service name="com.sun.star.form.control.FilterControl"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.forms.OFormattedFieldWrapper_ForcedFormatted">
+ <service name="com.sun.star.form.binding.BindableDatabaseFormattedField"/>
+ <service name="com.sun.star.form.component.DatabaseFormattedField"/>
+ <service name="com.sun.star.form.component.FormattedField"/>
+ <service name="stardiv.one.form.component.FormattedField"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.forms.ORichTextModel">
+ <service name="com.sun.star.form.FormComponent"/>
+ <service name="com.sun.star.form.FormControlModel"/>
+ <service name="com.sun.star.form.component.RichTextControl"/>
+ <service name="com.sun.star.style.CharacterProperties"/>
+ <service name="com.sun.star.style.CharacterPropertiesAsian"/>
+ <service name="com.sun.star.style.CharacterPropertiesComplex"/>
+ <service name="com.sun.star.style.ParagraphProperties"/>
+ <service name="com.sun.star.style.ParagraphPropertiesComplex"/>
+ <service name="com.sun.star.text.TextRange"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.forms.OScrollBarModel">
+ <service name="com.sun.star.form.FormComponent"/>
+ <service name="com.sun.star.form.FormControlModel"/>
+ <service name="com.sun.star.form.binding.BindableIntegerValueRange"/>
+ <service name="com.sun.star.form.component.ScrollBar"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.forms.OSpinButtonModel">
+ <service name="com.sun.star.form.FormComponent"/>
+ <service name="com.sun.star.form.FormControlModel"/>
+ <service name="com.sun.star.form.binding.BindableIntegerValueRange"/>
+ <service name="com.sun.star.form.component.SpinButton"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.xml.xpath.XFormsExtension">
+ <service name="com.sun.star.xml.xpath.XPathExtension"/>
+ </implementation>
+ <implementation name="com.sun.star.form.ImageProducer">
+ <service name="com.sun.star.awt.ImageProducer"/>
+ </implementation>
+ <implementation name="com.sun.star.form.Model">
+ <service name="com.sun.star.xforms.Model"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OButtonControl">
+ <service name="com.sun.star.form.control.CommandButton"/>
+ <service name="stardiv.one.form.control.CommandButton"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OButtonModel">
+ <service name="com.sun.star.form.component.CommandButton"/>
+ <service name="stardiv.one.form.component.CommandButton"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OCheckBoxControl">
+ <service name="com.sun.star.form.control.CheckBox"/>
+ <service name="stardiv.one.form.control.CheckBox"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OCheckBoxModel">
+ <service name="com.sun.star.form.binding.BindableDatabaseCheckBox"/>
+ <service name="com.sun.star.form.component.CheckBox"/>
+ <service name="com.sun.star.form.component.DatabaseCheckBox"/>
+ <service name="stardiv.one.form.component.CheckBox"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OComboBoxControl">
+ <service name="com.sun.star.form.control.ComboBox"/>
+ <service name="stardiv.one.form.control.ComboBox"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OComboBoxModel">
+ <service name="com.sun.star.form.binding.BindableDatabaseComboBox"/>
+ <service name="com.sun.star.form.component.ComboBox"/>
+ <service name="com.sun.star.form.component.DatabaseComboBox"/>
+ <service name="stardiv.one.form.component.ComboBox"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OCurrencyControl">
+ <service name="com.sun.star.form.control.CurrencyField"/>
+ <service name="stardiv.one.form.control.CurrencyField"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OCurrencyModel">
+ <service name="com.sun.star.form.component.CurrencyField"/>
+ <service name="com.sun.star.form.component.DatabaseCurrencyField"/>
+ <service name="stardiv.one.form.component.CurrencyField"/>
+ </implementation>
+ <implementation name="com.sun.star.form.ODateControl">
+ <service name="com.sun.star.form.control.DateField"/>
+ <service name="stardiv.one.form.control.DateField"/>
+ </implementation>
+ <implementation name="com.sun.star.form.ODateModel">
+ <service name="com.sun.star.form.component.DatabaseDateField"/>
+ <service name="com.sun.star.form.component.DateField"/>
+ <service name="stardiv.one.form.component.DateField"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OEditControl">
+ <service name="com.sun.star.form.control.TextField"/>
+ <service name="stardiv.one.form.control.Edit"/>
+ <service name="stardiv.one.form.control.TextField"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OEditModel">
+ <service name="com.sun.star.form.binding.BindableDatabaseTextField"/>
+ <service name="com.sun.star.form.component.DatabaseTextField"/>
+ <service name="com.sun.star.form.component.TextField"/>
+ <service name="stardiv.one.form.component.TextField"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OFileControlModel">
+ <service name="com.sun.star.form.component.FileControl"/>
+ <service name="stardiv.one.form.component.FileControl"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OFixedTextModel">
+ <service name="com.sun.star.form.component.FixedText"/>
+ <service name="stardiv.one.form.component.FixedText"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OFormattedControl">
+ <service name="com.sun.star.form.control.FormattedField"/>
+ <service name="stardiv.one.form.control.FormattedField"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OFormattedFieldWrapper">
+ <service name="stardiv.one.form.component.Edit"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OFormsCollection">
+ <service name="com.sun.star.form.Forms"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OGridControlModel">
+ <service name="com.sun.star.form.component.GridControl"/>
+ <service name="stardiv.one.form.component.Grid"/>
+ <service name="stardiv.one.form.component.GridControl"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OGroupBoxControl">
+ <service name="com.sun.star.form.control.GroupBox"/>
+ <service name="stardiv.one.form.control.GroupBox"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OGroupBoxModel">
+ <service name="com.sun.star.form.component.GroupBox"/>
+ <service name="stardiv.one.form.component.GroupBox"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OHiddenModel">
+ <service name="com.sun.star.form.component.HiddenControl"/>
+ <service name="stardiv.one.form.component.Hidden"/>
+ <service name="stardiv.one.form.component.HiddenControl"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OImageButtonControl">
+ <service name="com.sun.star.form.control.ImageButton"/>
+ <service name="stardiv.one.form.control.ImageButton"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OImageButtonModel">
+ <service name="com.sun.star.form.component.ImageButton"/>
+ <service name="stardiv.one.form.component.ImageButton"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OImageControlControl">
+ <service name="com.sun.star.form.control.ImageControl"/>
+ <service name="stardiv.one.form.control.ImageControl"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OImageControlModel">
+ <service name="com.sun.star.form.component.DatabaseImageControl"/>
+ <service name="stardiv.one.form.component.ImageControl"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OListBoxControl">
+ <service name="com.sun.star.form.control.ListBox"/>
+ <service name="stardiv.one.form.control.ListBox"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OListBoxModel">
+ <service name="com.sun.star.form.binding.BindableDatabaseListBox"/>
+ <service name="com.sun.star.form.component.DatabaseListBox"/>
+ <service name="com.sun.star.form.component.ListBox"/>
+ <service name="stardiv.one.form.component.ListBox"/>
+ </implementation>
+ <implementation name="com.sun.star.form.ONumericControl">
+ <service name="com.sun.star.form.control.NumericField"/>
+ <service name="stardiv.one.form.control.NumericField"/>
+ </implementation>
+ <implementation name="com.sun.star.form.ONumericModel">
+ <service name="com.sun.star.form.binding.BindableDatabaseNumericField"/>
+ <service name="com.sun.star.form.component.DatabaseNumericField"/>
+ <service name="com.sun.star.form.component.NumericField"/>
+ <service name="stardiv.one.form.component.NumericField"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OPatternControl">
+ <service name="com.sun.star.form.control.PatternField"/>
+ <service name="stardiv.one.form.control.PatternField"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OPatternModel">
+ <service name="com.sun.star.form.component.DatabasePatternField"/>
+ <service name="com.sun.star.form.component.PatternField"/>
+ <service name="stardiv.one.form.component.PatternField"/>
+ </implementation>
+ <implementation name="com.sun.star.form.ORadioButtonControl">
+ <service name="com.sun.star.form.control.RadioButton"/>
+ <service name="stardiv.one.form.control.RadioButton"/>
+ </implementation>
+ <implementation name="com.sun.star.form.ORadioButtonModel">
+ <service name="com.sun.star.form.binding.BindableDatabaseRadioButton"/>
+ <service name="com.sun.star.form.component.DatabaseRadioButton"/>
+ <service name="com.sun.star.form.component.RadioButton"/>
+ <service name="stardiv.one.form.component.RadioButton"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OTimeControl">
+ <service name="com.sun.star.form.control.TimeField"/>
+ <service name="stardiv.one.form.control.TimeField"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OTimeModel">
+ <service name="com.sun.star.form.component.DatabaseTimeField"/>
+ <service name="com.sun.star.form.component.TimeField"/>
+ <service name="stardiv.one.form.component.TimeField"/>
+ </implementation>
+ <implementation name="com.sun.star.form.XForms">
+ <service name="com.sun.star.xforms.XForms"/>
+ </implementation>
+</component>
diff --git a/forms/util/frm.dxp b/forms/util/frm.dxp
index 9e59e94034a6..f0e1c69934bc 100644
--- a/forms/util/frm.dxp
+++ b/forms/util/frm.dxp
@@ -1,3 +1,2 @@
-component_writeInfo
component_getImplementationEnvironment
component_getFactory
diff --git a/forms/util/makefile.mk b/forms/util/makefile.mk
index 79869f0fe8ed..fa7cb791b5e1 100644
--- a/forms/util/makefile.mk
+++ b/forms/util/makefile.mk
@@ -111,3 +111,11 @@ $(MISC)$/$(SHL1TARGET).flt: makefile.mk
@echo NavigationToolBar >>$@
@echo ONavigationBar >>$@
+
+ALLTAR : $(MISC)/frm.component
+
+$(MISC)/frm.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ frm.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt frm.component