From 6c4b6d9b49a97c8098fc9bdfa6f03c7847c91fb9 Mon Sep 17 00:00:00 2001 From: Lars Langhans Date: Mon, 7 Jun 2010 13:14:09 +0200 Subject: sb123:#i111449# cleanups in extensions qa/complex tests --- extensions/prj/build.lst | 3 + .../complex/extensions/OfficeResourceLoader.java | 84 +++++++++++++++------- extensions/qa/complex/extensions/makefile.mk | 59 ++++++++------- 3 files changed, 91 insertions(+), 55 deletions(-) diff --git a/extensions/prj/build.lst b/extensions/prj/build.lst index 1489e2a4e0e4..e6a4e02a8096 100644 --- a/extensions/prj/build.lst +++ b/extensions/prj/build.lst @@ -34,3 +34,6 @@ ex extensions\source\update\feed nmake - all ex_updchkfeed ex ex extensions\source\update\check nmake - all ex_updchk ex_inc NULL ex extensions\source\update\ui nmake - all ex_updchkui ex_inc NULL ex extensions\util nmake - all ex_util ex_preload ex_abpilot ex_dbpilots ex_logging ex_ldap ex_propctrlr ex_bib ex_plutil ex_oooimprovecore NULL + +# Fails at the moment +# ex extensions\qa\complex\extensions nmake - all ex_complex ex_util NULL diff --git a/extensions/qa/complex/extensions/OfficeResourceLoader.java b/extensions/qa/complex/extensions/OfficeResourceLoader.java index d0b2f1db2db8..f28d04d3d438 100644 --- a/extensions/qa/complex/extensions/OfficeResourceLoader.java +++ b/extensions/qa/complex/extensions/OfficeResourceLoader.java @@ -26,6 +26,7 @@ ************************************************************************/ package complex.extensions; +import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.uno.UnoRuntime; import com.sun.star.resource.XResourceBundle; @@ -34,7 +35,15 @@ import com.sun.star.beans.XPropertySet; import com.sun.star.uno.XComponentContext; import com.sun.star.lang.Locale; -public class OfficeResourceLoader extends complexlib.ComplexTestCase +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 OfficeResourceLoader { XResourceBundleLoader m_loader; XResourceBundle m_bundle; @@ -45,37 +54,36 @@ public class OfficeResourceLoader extends complexlib.ComplexTestCase } /* ------------------------------------------------------------------ */ - public String[] getTestMethodNames() - { - return new String[] { - "checkSimpleStringAccess", - "checkLocales" - }; - } +// public String[] getTestMethodNames() +// { +// return new String[] { +// "checkSimpleStringAccess", +// "checkLocales" +// }; +// } /* ------------------------------------------------------------------ */ - public String getTestObjectName() - { - return "Extensions - OfficeResourceLoader"; - } +// public String getTestObjectName() +// { +// return "Extensions - OfficeResourceLoader"; +// } /* ------------------------------------------------------------------ */ - public void before() throws com.sun.star.uno.Exception, java.lang.Exception + @Before public void before() throws com.sun.star.uno.Exception, java.lang.Exception { - XPropertySet orb = (XPropertySet)UnoRuntime.queryInterface( XPropertySet.class, param.getMSF() ); - XComponentContext context = (XComponentContext)UnoRuntime.queryInterface( XComponentContext.class, - orb.getPropertyValue( "DefaultContext" ) ); + XPropertySet orb = UnoRuntime.queryInterface(XPropertySet.class, getMSF()); + XComponentContext context = UnoRuntime.queryInterface(XComponentContext.class, orb.getPropertyValue("DefaultContext")); m_loader = com.sun.star.resource.OfficeResourceLoader.get( context ); } /* ------------------------------------------------------------------ */ - public void after() throws com.sun.star.uno.Exception, java.lang.Exception + @After public void after() throws com.sun.star.uno.Exception, java.lang.Exception { } /* ------------------------------------------------------------------ */ - public void checkSimpleStringAccess() throws com.sun.star.uno.Exception, java.lang.Exception + @Test public void checkSimpleStringAccess() throws com.sun.star.uno.Exception, java.lang.Exception { // default bundle (UI locale) m_bundle = m_loader.loadBundle_Default( "orl" ); @@ -88,34 +96,62 @@ public class OfficeResourceLoader extends complexlib.ComplexTestCase && resourceLocale.Country.equals( "US" ) && resourceLocale.Variant.equals( "" ) ) - assure( "invalid 'en-US' string", testString.equals( "Dummy String" ) ); + { + assertTrue( "invalid 'en-US' string", testString.equals( "Dummy String" ) ); + } if ( resourceLocale.Language.equals( "de" ) && resourceLocale.Country.equals( "" ) && resourceLocale.Variant.equals( "" ) ) - assure( "invalid 'de' string", testString.equals( "Attrappen-Zeichenkette" ) ); + { + assertTrue( "invalid 'de' string", testString.equals( "Attrappen-Zeichenkette" ) ); + } if ( resourceLocale.Language.equals( "" ) && resourceLocale.Country.equals( "" ) && resourceLocale.Variant.equals( "" ) ) - assure( "invalid unlocalized string", testString.equals( "unlocalized string" ) ); + { + assertTrue( "invalid unlocalized string", testString.equals( "unlocalized string" ) ); + } } /* ------------------------------------------------------------------ */ - public void checkLocales() throws com.sun.star.uno.Exception, java.lang.Exception + @Test public void checkLocales() throws com.sun.star.uno.Exception, java.lang.Exception { // en-US bundle (should always be built and thus present and thus found) m_bundle = m_loader.loadBundle( "orl", new Locale( "en", "US", "" ) ); Locale resourceLocale = m_bundle.getLocale(); - assure( "'en-US' could not be loaded", + assertTrue( "'en-US' could not be loaded", resourceLocale.Language.equals( "en" ) && resourceLocale.Country.equals( "US" ) && resourceLocale.Variant.equals( "" ) ); // some (invalid) locale which is usually no built, and should thus fallback to en-US m_bundle = m_loader.loadBundle( "orl", new Locale( "inv", "al", "id" ) ); resourceLocale = m_bundle.getLocale(); - assure( "non-existing locale request does not fallback to en-US", + assertTrue( "non-existing locale request does not fallback to en-US", resourceLocale.Language.equals( "en" ) && resourceLocale.Country.equals( "US" ) && resourceLocale.Variant.equals( "" ) ); } + + + 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/extensions/qa/complex/extensions/makefile.mk b/extensions/qa/complex/extensions/makefile.mk index 96c2afb40bf3..281960b32da9 100644 --- a/extensions/qa/complex/extensions/makefile.mk +++ b/extensions/qa/complex/extensions/makefile.mk @@ -25,12 +25,26 @@ # #************************************************************************* -PRJ = ..$/..$/.. -TARGET = ExtensionsComplexTests +.IF "$(OOO_SUBSEQUENT_TESTS)" == "" +nothing .PHONY: +.ELSE + +PRJ = ../../.. PRJNAME = extensions -PACKAGE = complex$/$(PRJNAME) +TARGET = qa_complex_extensions + +.IF "$(OOO_JUNIT_JAR)" != "" +PACKAGE = complex/extensions +JAVATESTFILES = \ + OfficeResourceLoader.java + +JAVAFILES = $(JAVATESTFILES) + +JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar jurt.jar ConnectivityTools.jar +EXTRAJARFILES = $(OOO_JUNIT_JAR) +.END + -RES_TARGET = orl .IF "$(GUI)"=="WNT" command_seperator=&& @@ -38,11 +52,11 @@ command_seperator=&& command_seperator=; .ENDIF -# --- Settings ----------------------------------------------------- -.INCLUDE : settings.mk +.INCLUDE: settings.mk #----- resource files for the OfficeResourceLoader test ------------ +RES_TARGET = orl SRS1NAME=$(RES_TARGET)_A_ SRC1FILES= \ @@ -66,36 +80,19 @@ RES2FILELIST=\ RESLIB2NAME=$(RES_TARGET)_B_ RESLIB2SRSFILES=$(RES2FILELIST) +.INCLUDE: target.mk +.INCLUDE: installationtest.mk -#----- compile .java files ----------------------------------------- -JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar ConnectivityTools.jar -JAVAFILES = $(shell @$(FIND) .$/*.java) -JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) - -#----- make a jar from compiled files ------------------------------ - -MAXLINELENGTH = 100000 - -JARCLASSDIRS = $(PACKAGE) -JARTARGET = $(TARGET).jar -JARCOMPRESS = TRUE - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk +#----- resource files for the OfficeResourceLoader test ------------ -RUNNER_CLASSPATH = -cp $(CLASSPATH)$(PATH_SEPERATOR)$(SOLARBINDIR)$/OOoRunner.jar$(PATH_SEPERATOR)$(CLASSPATH)$(PATH_SEPERATOR)$(SOLARBINDIR)$/ConnectivityTools.jar -RUNNER_ARGS = org.openoffice.Runner -TestBase java_complex -run:copy_resources - +java $(RUNNER_CLASSPATH) $(RUNNER_ARGS) -sce extensions_all.sce +ALLTAR : copy_resources javatest -run_%:copy_resources - +java $(RUNNER_CLASSPATH) $(RUNNER_ARGS) -o complex.$(PRJNAME).$(@:s/run_//) +copy_resources: $(RESLIB1TARGETN) $(RESLIB2TARGETN) + $(foreach,i,$(RESLIB1TARGETN) $(COPY) $i $(i:s/de/invalid/:s/_A_//) $(command_seperator)) echo + $(foreach,i,$(RESLIB2TARGETN) $(COPY) $i $(i:s/en-US/invalid/:s/_B_//) $(command_seperator)) echo -copy_resources: $(RESLIB1TARGETN) $(RESLIB2TARGETN) - @$(foreach,i,$(RESLIB1TARGETN) $(COPY) $i $(i:s/de/invalid/:s/_A_//) $(command_seperator)) echo. - @$(foreach,i,$(RESLIB2TARGETN) $(COPY) $i $(i:s/en-US/invalid/:s/_B_//) $(command_seperator)) echo. +.END -- cgit From ca1a016c5c9121a878bded25378b47c600dc0b3d Mon Sep 17 00:00:00 2001 From: Lars Langhans Date: Wed, 16 Jun 2010 11:34:04 +0200 Subject: sb123:#i111449# cleanups in beans qa/complex tests --- .../sun/star/comp/beans/LocalOfficeConnection.java | 13 +- bean/com/sun/star/comp/beans/OOoBean.java | 11 +- bean/prj/build.lst | 4 + bean/qa/complex/OOoBeanTest.java | 656 ------------------ bean/qa/complex/ScreenComparer.java | 233 ------- bean/qa/complex/WriterFrame.java | 209 ------ bean/qa/complex/bean/OOoBeanTest.java | 737 +++++++++++++++++++++ bean/qa/complex/bean/ScreenComparer.java | 249 +++++++ bean/qa/complex/bean/WriterFrame.java | 210 ++++++ bean/qa/complex/bean/makefile.mk | 138 ++++ bean/qa/complex/makefile.mk | 95 --- 11 files changed, 1359 insertions(+), 1196 deletions(-) delete mode 100644 bean/qa/complex/OOoBeanTest.java delete mode 100644 bean/qa/complex/ScreenComparer.java delete mode 100644 bean/qa/complex/WriterFrame.java create mode 100644 bean/qa/complex/bean/OOoBeanTest.java create mode 100644 bean/qa/complex/bean/ScreenComparer.java create mode 100644 bean/qa/complex/bean/WriterFrame.java create mode 100644 bean/qa/complex/bean/makefile.mk delete mode 100644 bean/qa/complex/makefile.mk diff --git a/bean/com/sun/star/comp/beans/LocalOfficeConnection.java b/bean/com/sun/star/comp/beans/LocalOfficeConnection.java index 8467f1b75812..cc7545ad3e22 100644 --- a/bean/com/sun/star/comp/beans/LocalOfficeConnection.java +++ b/bean/com/sun/star/comp/beans/LocalOfficeConnection.java @@ -153,7 +153,18 @@ public class LocalOfficeConnection {} } - /** + /** + * protected Constructor + * Initialise a LocalOfficeConnection with an already running office. + * This C'Tor is only used in complex tests at the moment. + * @param xContext + */ + protected LocalOfficeConnection(com.sun.star.uno.XComponentContext xContext) + { + this.mContext = xContext; + } + + /** * Sets a connection URL. * This implementation accepts a UNO URL with following format:
*
diff --git a/bean/com/sun/star/comp/beans/OOoBean.java b/bean/com/sun/star/comp/beans/OOoBean.java
index b10becb3ce9a..44871d2a2675 100644
--- a/bean/com/sun/star/comp/beans/OOoBean.java
+++ b/bean/com/sun/star/comp/beans/OOoBean.java
@@ -601,8 +601,15 @@ public class OOoBean
                     xURLTransformer = (com.sun.star.util.XURLTransformer) UnoRuntime.queryInterface(
                         com.sun.star.util.XURLTransformer.class,
                         xServiceFactory.createInstance( "com.sun.star.util.URLTransformer") );
-                    xDispatcher = (com.sun.star.frame.XDispatchProvider)UnoRuntime.queryInterface(
-                        com.sun.star.frame.XDispatchProvider.class, aFrame );
+
+                                        try
+                                        {
+                                            xDispatcher = UnoRuntime.queryInterface(com.sun.star.frame.XDispatchProvider.class, aFrame);
+                                        }
+                                        catch (Exception e)
+                                        {
+                                            /*ignore!*/
+                                        }
 
                     // get XComponentLoader from frame
                     com.sun.star.frame.XComponentLoader xLoader = (com.sun.star.frame.XComponentLoader)
diff --git a/bean/prj/build.lst b/bean/prj/build.lst
index 3767e8fff387..91d443344555 100644
--- a/bean/prj/build.lst
+++ b/bean/prj/build.lst
@@ -4,3 +4,7 @@ ob	bean\com\sun\star\beans			nmake	-	all	ob_legacybeanjava ob_beanjava NULL
 ob	bean\native\win32				nmake	-	n	ob_beanwin32 NULL
 ob	bean\native\unix				nmake	-	u	ob_beanunix NULL
 ob  bean\util              			nmake   -   all	ob_util ob_beanjava ob_legacybeanjava ob_beanwin32.n ob_beanunix.u NULL
+
+# complex tests compileable but fail at runtime
+# ob      bean\qa\complex\bean                    nmake   -   all ob_qa_complex ob_util NULL
+
diff --git a/bean/qa/complex/OOoBeanTest.java b/bean/qa/complex/OOoBeanTest.java
deleted file mode 100644
index 2d038e8b37af..000000000000
--- a/bean/qa/complex/OOoBeanTest.java
+++ /dev/null
@@ -1,656 +0,0 @@
-/*************************************************************************
- *
- * 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
- * 
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-package complex;
-
-
-import complexlib.ComplexTestCase;
-import java.io.*;
-import java.awt.Rectangle;
-import java.awt.Insets;
-import java.awt.BorderLayout;
-import java.awt.Dimension;
-import java.awt.image.BufferedImage;
-import java.awt.image.PixelGrabber;
-import java.awt.GridBagLayout;
-import java.awt.GridBagConstraints;
-import java.awt.event.*;
-import java.awt.Frame;
-import java.awt.Toolkit;
-import java.awt.Robot;
-import java.awt.event.KeyEvent;
-import java.awt.Button;
-import javax.imageio.ImageIO;
-import javax.imageio.stream.FileImageOutputStream;
-import com.sun.star.comp.beans.OOoBean;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.text.XTextDocument;
-
-import java.awt.*;
-
-public class OOoBeanTest extends ComplexTestCase
-{
-
-    public String[] getTestMethodNames()
-    {
-        // TODO think about trigger of sub-tests from outside
-        return new String[]
-        {
-              "test1",
-              "test2",
-              "test3",
-              "test4",
-              "test5",
-              "test6",
-              "test6a",
-              "test7",
-              "test8"
-        };
-    }
-
-    /** For X-Windows we need to prolong the time between painting windows. Because
-        it takes longer than on Windows.
-    */
-    int getSleepTime(int time)
-    {
-        int ret = time;
-        if (isWindows() == false)
-            return time * 5;
-        return time;
-    }
-
-    /** If it cannot be determined if we run on Windows then we assume
-        that we do not.
-    */
-    boolean isWindows()
-    {
-        boolean ret = false;
-        String os = System.getProperty("os.name");
-        if (os != null)
-        {
-            os = os.trim();
-            if (os.indexOf("Win") == 0)
-                ret = true;
-        }
-        return ret;
-    }
-
-    public String getText(OOoBean bean) throws Exception
-    {
-        com.sun.star.frame.XModel model = (com.sun.star.frame.XModel)bean.getDocument();
-        com.sun.star.text.XTextDocument myDoc =
-            (XTextDocument) UnoRuntime.queryInterface(com.sun.star.text.XTextDocument.class,
-                                                      model);
-        com.sun.star.text.XText xText = myDoc.getText();
-        return xText.getString();
-    }
-
-    /** 1.Create a Java frame
-     *  2.Add OOoBean (no document loaded yet)
-     *  3.Show frame
-     *  4.Load document
-     */
-    public void test1() throws Exception
-    {
-        WriterFrame f = null;
-        try
-        {
-            f = new WriterFrame(100 ,100, 500 ,400, false);
-            f.setText("OOoBean test.");
-            Thread.sleep(1000);
-        }
-        finally
-        {
-            if (f != null)
-                f.dispose();
-        }
-    }
-
-    /** Sizing, painting
-     */
-    public void test2() throws Exception
-    {
-        WriterFrame f = null;
-        ScreenComparer capturer = null;
-        try
-        {
-            f = new WriterFrame(100, 100, 500,500, false);
-            if (f.checkUnoFramePosition() == false)
-                failed("Sizing error: Client are of Java frame does not match the UNO window.", true);
-            capturer = new ScreenComparer(100, 100, 500, 500);
-
-            //Minimize Window and back
-            f.goToStart();
-            f.pageDown();
-            Thread.sleep(1000);
-            for (int i = 0; i < 3; i++)
-            {
-                capturer.reset();
-                capturer.grabOne(f.getClientArea());
-                f.setExtendedState(Frame.ICONIFIED);
-                Thread.sleep(getSleepTime(200));
-                if (f.checkUnoFramePosition() == false)
-                    failed("Sizing error: Frame was iconified.", true);
-                f.setExtendedState(Frame.NORMAL);
-                Thread.sleep(getSleepTime(200));
-                if (f.checkUnoFramePosition() == false)
-                    failed("Sizing error: Frame size set back to normal after it was iconified.", true);
-                capturer.grabTwo(f.getClientArea());
-                if (capturer.compare() == false)
-                {
-                    failed("Painting error: Minimize (iconify) frame and back to normal size.", true);
-                    capturer.writeImages();
-                }
-            }
-
-            //Maximize Window and back to normal
-            for (int i = 0; i < 3; i++)
-            {
-                capturer.reset();
-                capturer.grabOne(f.getClientArea());
-                f.setExtendedState(Frame.MAXIMIZED_BOTH);
-                Thread.sleep(getSleepTime(200));
-                if (f.checkUnoFramePosition() == false)
-                    failed("Sizing error: Frame maximized.", true);
-                f.setExtendedState(Frame.NORMAL);
-                Thread.sleep(getSleepTime(200));
-                if (f.checkUnoFramePosition() == false)
-                    failed("Sizing error: Frame set from maximized to normal.", true);
-                capturer.grabTwo(f.getClientArea());
-                if (capturer.compare() == false)
-                {
-                    failed("Painting error: Maximize frame and back to normal size", true);
-                    capturer.writeImages();
-                }
-            }
-
-            //move Window top left
-            capturer.reset();
-            capturer.grabOne(f.getClientArea());
-            Rectangle oldPosition = f.getBounds();
-            f.setBounds(0, 0, oldPosition.width, oldPosition.height);
-            Thread.sleep(getSleepTime(200));
-            if (f.checkUnoFramePosition() == false)
-                failed("Sizing error: Frame moved.", true);
-
-            capturer.grabTwo(f.getClientArea());
-            if (capturer.compare() == false)
-            {
-                failed("Painting error: Move frame to a different position.", true);
-                capturer.writeImages();
-            }
-
-            //move Window down
-            Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
-            int maxY = dim.height - f.getBounds().height;
-
-            int curY = 0;
-            while (curY < maxY)
-            {
-                capturer.reset();
-                capturer.grabOne(f.getClientArea());
-                oldPosition = f.getBounds();
-                f.setBounds(0, curY, oldPosition.width, oldPosition.height);
-                capturer.grabTwo(f.getClientArea());
-                if (capturer.compare() == false)
-                {
-                    failed("Painting error: Move frame to a different position.", true);
-                    capturer.writeImages();
-                }
-                curY+= 50;
-                Thread.sleep(getSleepTime(200));
-            }
-
-            //obscure the window and make it visible again
-
-            oldPosition = f.getBounds();
-
-            Rectangle pos = new Rectangle(oldPosition.x - 50, oldPosition.y - 50,
-                                          oldPosition.width, oldPosition.height);
-            Frame coverFrame = new Frame();
-            coverFrame.setBounds(pos);
-            capturer.reset();
-            capturer.grabOne(f.getClientArea());
-
-            for (int i = 0; i < 3; i++)
-            {
-                coverFrame.setVisible(true);
-                Thread.sleep(getSleepTime(200));
-                f.toFront();
-                Thread.sleep(getSleepTime(200));
-                if (f.checkUnoFramePosition() == false)
-                    failed("Sizing error: Frame moved from back to front.", true);
-
-                capturer.grabTwo(f.getClientArea());
-                if (capturer.compare() == false)
-                {
-                    failed("Painting error: Move frame to back and to front.", true);
-                    capturer.writeImages();
-                }
-            }
-
-            coverFrame.dispose();
-        }
-        finally
-        {
-            if (f != null)
-                f.dispose();
-        }
-    }
-
-    /**
-       1. Create a OOoBean
-       2. Load a document
-       3. Create Frame (do not show yet)
-       4. Add OOoBean to Frame
-       5. Show Frame
-    */
-    public void test3() throws Exception
-    {
-        WriterFrame f = null;
-        try
-        {
-            f = new WriterFrame(100, 100, 500, 300, true);
-            if (f.checkUnoFramePosition() == false)
-                failed("Sizing error.", true);
-
-        }
-        finally
-        {
-            if (f != null)
-                f.dispose();
-        }
-    }
-
-    /** Test repeated OOoBean.aquireSystemWindow and OOoBean.releaseSystemWindow
-     * calls.
-     */
-    public void test4() throws Exception
-    {
-        WriterFrame f = null;
-        try
-        {
-            f = new WriterFrame(100, 100, 500, 300, false);
-            OOoBean b = f.getBean();
-            for (int i = 0; i < 100; i++)
-            {
-                b.releaseSystemWindow();
-                b.aquireSystemWindow();
-            }
-            if (f.checkUnoFramePosition() == false)
-                failed("Sizing error.", true);
-        }
-        finally
-        {
-            if (f != null)
-                f.dispose();
-            if (isWindows() == false)
-                Thread.sleep(10000);
-        }
-    }
-
-    /** Adding and removing the bean to a Java frame multiple times.
-     * Test painting and sizing.
-     */
-    public void test5() throws Exception
-    {
-        WriterFrame f = null;
-        try
-        {
-            f = new WriterFrame(100, 100, 500, 400, false);
-            f.goToStart();
-            f.pageDown();
-            Thread.sleep(1000);
-
-            ScreenComparer capturer = new ScreenComparer(100,100,500,400);
-            capturer.grabOne();
-            for (int i = 0; i < 100; i++)
-            {
-                f.removeOOoBean();
-                f.addOOoBean();
-            }
-
-            f.goToStart();
-            f.pageDown();
-            Thread.sleep(getSleepTime(200));
-            capturer.grabTwo();
-
-            if (capturer.compare() == false)
-            {
-                failed("Painting error: adding and removing OOoBean " +
-                       "repeatedly to java.lang.Frame.", true);
-                capturer.writeImages();
-            }
-
-            if (f.checkUnoFramePosition() == false)
-                failed("Sizing error.", true);
-
-        }
-        finally
-        {
-            if (f != null)
-                f.dispose();
-            if (isWindows() == false)
-                Thread.sleep(10000);
-        }
-    }
-
-
-    /** Test focus  (i49454). After repeatedly adding and removing the bean to a window
-     * it should still be possible to enter text in the window. This does not
-     * work all the time on Windows. This is probably a timing problem. When using
-     * Thread.sleep (position #1) then it should work.
-     */
-    public void test6() throws Exception
-    {
-        for (int j = 0; j < 10; j++)
-        {
-            final OOoBean bean = new OOoBean();
-            java.awt.Frame frame = null;
-            bean.setOOoCallTimeOut(10000);
-            try {
-                frame = new java.awt.Frame("OpenOffice.org Demo");
-                frame.add(bean, BorderLayout.CENTER);
-                frame.pack();
-                frame.setSize(600,300);
-                frame.show();
-                bean.loadFromURL("private:factory/swriter", null);
-                // #1
-                Thread.sleep(1000);
-
-                StringBuffer buf = new StringBuffer(1000);
-                for (int i = 0; i < 1; i++)
-                {
-//                    Thread.sleep(1000);
-                    bean.releaseSystemWindow();
-                    frame.remove(bean);
-//                    frame.validate();
-//                    Thread.sleep(1000);
-                    frame.add(bean, BorderLayout.CENTER);
-                    bean.aquireSystemWindow();
-//                    frame.validate();
-                }
-
-                if (isWindows() == false)
-                    Thread.sleep(5000);
-
-                Robot roby = new Robot();
-                roby.keyPress(KeyEvent.VK_H);
-                roby.keyRelease(KeyEvent.VK_H);
-                buf.append("h");
-
-                String s = getText(bean);
-                if ( ! s.equals(buf.toString()))
-                {
-                    failed("Focus error: After removing and adding the bean, the" +
-                           "office window does not receive keyboard input.\n" +
-                           "Try typing in the window, you've got 30s!!! This " +
-                           "test may not work with Linux/Solaris", true);
-                    Thread.sleep(30000);
-                    break;
-                }
-                else
-                {
-                    Thread.sleep(2000);
-                }
-
-            } finally {
-                bean.stopOOoConnection();
-                frame.dispose();
-            }
-        }
-    }
-
-    /** Tests focus problem just like test6, but the implementation is a little
-     * different. The bean is added and removed from withing the event dispatch
-     * thread. Using Thread.sleep at various points (#1, #2, #3) seems to workaround
-     * the problem.
-     */
-    public void test6a() throws Exception
-    {
-        for (int j = 0; j < 50; j++)
-        {
-            final OOoBean bean = new OOoBean();
-            final java.awt.Frame frame = new Frame("Openoffice.org");
-            bean.setOOoCallTimeOut(10000);
-
-            try {
-                frame.add(bean, BorderLayout.CENTER);
-                frame.pack();
-                frame.setSize(600,400);
-                frame.show();
-                bean.loadFromURL("private:factory/swriter", null);
-                frame.validate();
-                // #1
-                Thread.sleep(1000);
-                StringBuffer buf = new StringBuffer(1000);
-                int i = 0;
-
-                for (; i < 1; i++)
-                {
-                EventQueue q = Toolkit.getDefaultToolkit().getSystemEventQueue();
-                q.invokeAndWait( new Runnable() {
-                        public void run() {
-                            try {
-
-                            bean.releaseSystemWindow();
-                            frame.remove(bean);
-                            frame.validate();
-
-                            } catch (Exception e) {
-                                e.printStackTrace();
-                            }
-
-                            }
-                        });
-                // #2
-                Thread.sleep(1000);
-                q.invokeAndWait( new Runnable() {
-                        public void run() {
-                            try {
-
-                            frame.add(bean, BorderLayout.CENTER);
-                            bean.aquireSystemWindow();
-                            frame.validate();
-                            } catch (Exception e) {
-                                e.printStackTrace();
-                            }
-                            }
-                        });
-
-                // #3
-                Thread.sleep(1000);
-                }
-
-                if (isWindows() == false)
-                    Thread.sleep(5000);
-
-                Robot roby = new Robot();
-                roby.mouseMove(300, 200);
-                roby.waitForIdle();
-                roby.mousePress(InputEvent.BUTTON1_MASK);
-                roby.waitForIdle();
-                roby.mouseRelease(InputEvent.BUTTON1_MASK);
-                roby.waitForIdle();
-                roby.keyPress(KeyEvent.VK_H);
-                roby.waitForIdle();
-                roby.keyRelease(KeyEvent.VK_H);
-                roby.waitForIdle();
-
-                buf.append("h");
-                Thread.sleep(1000);
-                String s = getText(bean);
-                System.out.println(" getText: " + s);
-                if ( ! s.equals(buf.toString()))
-                {
-                    roby.mousePress(InputEvent.BUTTON1_MASK);
-                    roby.waitForIdle();
-                    roby.mouseRelease(InputEvent.BUTTON1_MASK);
-                    roby.waitForIdle();
-                    roby.keyPress(KeyEvent.VK_H);
-                    roby.waitForIdle();
-                    roby.keyRelease(KeyEvent.VK_H);
-                    roby.waitForIdle();
-
-                    String sH = "h";
-                    Thread.sleep(1000);
-                    String s2 = getText(bean);
-
-                    if ( ! sH.equals(s2))
-                    {
-                        failed("Focus error: After removing and adding the bean, the" +
-                               "office window does not receive keyboard input.\n" +
-                               "Try typing in the window, you've got 30s!!! This " +
-                               "test may not work with Linux/Solaris", true);
-                        System.out.println("j: " + j + "   i: " + i);
-                        Thread.sleep(30000);
-                        break;
-                    }
-                }
-                else
-                {
-                    //                   Thread.sleep(2000);
-                }
-
-            } finally {
-                bean.stopOOoConnection();
-                frame.dispose();
-            }
-        }
-    }
-
-    /** Repeatedly loading a document in one and the same OOoBean instance.
-     */
-    public void test7() throws Exception
-    {
-        WriterFrame f = null;
-        try
-        {
-            f = new WriterFrame(100 ,100, 500 ,400, false);
-            String text = "OOoBean test.";
-
-            for (int i = 0; i < 10; i++)
-            {
-                f.getBean().clear();
-                f.getBean().loadFromURL("private:factory/swriter", null);
-                f.setText(text);
-                f.goToStart();
-                f.validate();
-
-                if (text.equals(f.getText()) == false)
-                    failed("Repeated loading of a document failed.");
-                Thread.sleep(1000);
-            }
-        }
-        finally
-        {
-            if (f != null)
-                f.dispose();
-        }
-    }
-
-    /** Using multiple instances of OOoBean at the same time
-     */
-    public void test8() throws Exception
-    {
-        OOoBean bean1 = new OOoBean();
-        BeanPanel bp1 = new BeanPanel(bean1);
-        OOoBean bean2 = new OOoBean();
-        BeanPanel bp2 = new BeanPanel(bean2);
-        OOoBean bean3 = new OOoBean();
-        BeanPanel bp3 = new BeanPanel(bean3);
-        OOoBean bean4 = new OOoBean();
-        BeanPanel bp4 = new BeanPanel(bean4);
-
-        try
-        {
-            Frame f = new Frame("OOoBean example with several instances");
-            f.setLayout(new GridBagLayout());
-            GridBagConstraints c = new GridBagConstraints();
-            c.fill = GridBagConstraints.HORIZONTAL;
-            c.weightx = 0.5;
-
-            c.insets = new Insets(0, 0, 0, 10);
-            c.gridx = 0;
-            c.gridy = 0;
-            f.add(bp1, c);
-
-            c.gridx = 1;
-            c.insets = new Insets(0, 0, 0, 0);
-            f.add(bp2, c);
-
-            c.gridx = 0;
-            c.gridy = 1;
-            c.insets = new Insets(10, 0, 0, 10);
-            f.add(bp3, c);
-
-            c.gridx = 1;
-            c.gridy = 1;
-            c.insets = new Insets(10, 0, 0, 0);
-            f.add(bp4, c);
-
-            f.pack();
-            f.setBounds(0, 0, 1000, 600);
-            f.setVisible(true);
-            try {
-            bean1.loadFromURL("private:factory/swriter", null);
-            bean2.loadFromURL("private:factory/swriter", null);
-            bean3.loadFromURL("private:factory/swriter", null);
-            bean4.loadFromURL("private:factory/swriter", null);
-            } catch( Exception e)
-            {
-                e.printStackTrace();
-            }
-            f.validate();
-
-            Thread.sleep(10000);
-        }
-        finally
-        {
-            bean1.stopOOoConnection();
-            bean2.stopOOoConnection();
-            bean3.stopOOoConnection();
-            bean4.stopOOoConnection();
-        }
-    }
-
-    class BeanPanel extends Panel
-    {
-        public BeanPanel(OOoBean b)
-        {
-            setLayout(new BorderLayout());
-            add(b, BorderLayout.CENTER);
-        }
-        public Dimension getPreferredSize()
-        {
-            Container c = getParent();
-            return new Dimension(200, 200);
-        }
-    }
-
-}
-
-
diff --git a/bean/qa/complex/ScreenComparer.java b/bean/qa/complex/ScreenComparer.java
deleted file mode 100644
index a2547a763c58..000000000000
--- a/bean/qa/complex/ScreenComparer.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/*************************************************************************
- *
- * 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
- * 
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-package complex;
-
-
-import complexlib.ComplexTestCase;
-import java.io.File;
-import java.awt.Rectangle;
-import java.awt.BorderLayout;
-import java.awt.image.BufferedImage;
-import java.awt.image.PixelGrabber;
-import java.awt.event.*;
-import java.awt.Frame;
-import javax.imageio.ImageIO;
-import javax.imageio.stream.FileImageOutputStream;
-
-
-
-class ScreenComparer
-{
-    Rectangle m_rect;
-    BufferedImage m_img1;
-    BufferedImage m_img2;
-    BufferedImage m_imgDiff;
-
-    int m_diffColor;
-    public ScreenComparer(int x, int y, int width, int height)
-    {
-        this(new Rectangle(x, y, width, height));
-    }
-
-    public ScreenComparer(Rectangle location)
-    {
-        m_rect = location;
-        int red = 0xff;
-        int alpha = 0xff;
-        m_diffColor = (alpha << 24);
-        m_diffColor = m_diffColor | (red << 16);
-    }
-
-    public ScreenComparer()
-    {
-        this(new Rectangle(0, 0, 0, 0));
-    }
-
-    public void reset()
-    {
-        m_rect = null;
-        m_img1 = null;
-        m_img2 = null;
-        m_imgDiff = null;
-    }
-
-    public Rectangle getLocation()
-    {
-        return m_rect;
-    }
-    public void grabOne() throws Exception
-    {
-        grabOne(m_rect);
-    }
-
-    public void grabOne(Rectangle r) throws Exception
-    {
-        java.awt.Robot robot = new java.awt.Robot();
-        m_img1 = robot.createScreenCapture(r);
-    }
-
-    public void grabTwo() throws Exception
-    {
-        grabTwo(m_rect);
-    }
-
-    public void grabTwo(Rectangle r) throws Exception
-    {
-        java.awt.Robot robot = new java.awt.Robot();
-        m_img2 = robot.createScreenCapture(r);
-    }
-
-    public boolean compare() throws Exception
-    {
-        if (m_img1 == null || m_img2 == null)
-            throw new Exception("Only one image captured!");
-        boolean ret = true;
-        int w1 = m_img1.getWidth();
-        int h1 = m_img1.getHeight();
-        int w2 = m_img2.getWidth();
-        int h2 = m_img2.getHeight();
-
-        if (w1 != w2 || h1 != h2)
-        {
-            System.out.println("### 1\n");
-            //Different size. Create an image that holds both images.
-            int w = w1 > w2 ? w1 : w2;
-            int h = h1 > h2 ? h1 : h2;
-            m_imgDiff = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
-            for (int y = 0; y < h; y ++)
-            {
-                for (int x = 0; x < w; x++)
-                {
-                    boolean bOutOfRange = false;
-                    int pixel1 = 0;
-                    int pixel2 = 0;
-                    //get the pixel for m_img1
-                    if (x < w1 && y < h1)
-                        pixel1 = m_img1.getRGB(x, y);
-                    else
-                        bOutOfRange = true;
-
-                    if (x < w2 && y < h2)
-                        pixel2 = m_img2.getRGB(x, y);
-                    else
-                        bOutOfRange = true;
-
-                    if (bOutOfRange || pixel1 != pixel2)
-                        m_imgDiff.setRGB(x, y, m_diffColor);
-                    else
-                        m_imgDiff.setRGB(x, y, pixel1);
-
-                }
-            }
-            return false;
-        }
-
-        //Images have same dimension
-        int[] pixels1 = new int[w1 * h1];
-        PixelGrabber pg = new PixelGrabber(
-            m_img1.getSource(), 0, 0, w1, h1, pixels1, 0, w1);
-        pg.grabPixels();
-
-        int[] pixels2 = new int[w2 * h2];
-        PixelGrabber pg2 = new PixelGrabber(
-            m_img2.getSource(), 0, 0, w2, h2, pixels2, 0, w2);
-        pg2.grabPixels();
-
-        m_imgDiff = new BufferedImage(w1, h1, BufferedImage.TYPE_INT_ARGB);
-
-        //First check if the the images differ.
-        int lenAr = pixels1.length;
-        int index = 0;
-        for (index = 0; index < lenAr; index++)
-        {
-            if (pixels1[index] != pixels2[index])
-                break;
-        }
-
-        //If the images are different, then create the diff image
-        if (index < lenAr)
-        {
-            for (int y = 0; y < h1; y++)
-            {
-                for (int x = 0; x < w1; x++)
-                {
-                    int offset = y * w1 + x;
-                    if (pixels1[offset] != pixels2[offset])
-                    {
-                        ret = ret && false;
-                        m_imgDiff.setRGB(x, y, m_diffColor);
-                    }
-                    else
-                    {
-                        m_imgDiff.setRGB(x, y, pixels1[offset]);
-                    }
-                }
-            }
-        }
-        return ret;
-    }
-
-    /** Writes Images to a location. The
-     *  directory is determined by the java property OOoBean.Images
-     *
-     */
-    public void writeImages() throws Exception
-    {
-        String imgLocation = System.getProperty("OOoBean.Images", "");
-        File file_tmp = File.createTempFile("OOoBean", "", new File(imgLocation));
-        File file1 = new File(file_tmp.getPath()+".png");
-        file_tmp.delete();
-        if (m_img1 != null)
-        {
-            ImageIO.write(m_img1, "png", file1);
-            System.out.println("\nCompared images:");
-            System.out.println("1. " + file1.getPath());
-        }
-        file1= null;
-        file_tmp= null;
-        file_tmp = File.createTempFile("OOoBean", "", new File(imgLocation));
-        file1 = new File(file_tmp.getPath()+".png");
-        file_tmp.delete();
-        if (m_img2 != null)
-        {
-            ImageIO.write(m_img2, "png", file1);
-            System.out.println("2. " + file1.getPath());
-        }
-        file1= null;
-        file_tmp= null;
-        file_tmp = File.createTempFile("OOoBean", "_diff", new File(imgLocation));
-        file1 = new File(file_tmp.getPath()+".png");
-        file_tmp.delete();
-        if (m_imgDiff != null)
-        {
-            ImageIO.write(m_imgDiff, "png", file1);
-            System.out.println("Diff image: " + file1.getPath() + "\n");
-        }
-    }
-
-}
-
diff --git a/bean/qa/complex/WriterFrame.java b/bean/qa/complex/WriterFrame.java
deleted file mode 100644
index b2aff726ad05..000000000000
--- a/bean/qa/complex/WriterFrame.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*************************************************************************
- *
- * 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
- * 
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-package complex;
-
-
-import complexlib.ComplexTestCase;
-import java.awt.Rectangle;
-import java.awt.Insets;
-import java.awt.BorderLayout;
-import java.awt.event.*;
-import java.awt.Frame;
-import java.awt.Dimension;
-import com.sun.star.comp.beans.OOoBean;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.text.XTextDocument;
-
-
-class WriterFrame extends java.awt.Frame
-{
-    com.sun.star.comp.beans.OOoBean m_bean;
-    String m_sDocURL = "private:factory/swriter";
-
-    /**
-      @param loadBeforeVisible
-          the OOoBean is added to the frame before it is displayable. Then the Java Frame does
-          not have a native window peer yet.
-     */
-    public WriterFrame(int x, int y, int width, int height, boolean loadBeforeVisible) throws Exception
-    {
-
-        if (loadBeforeVisible == false)
-        {
-            m_bean = new com.sun.star.comp.beans.OOoBean();
-            add(m_bean, BorderLayout.CENTER);
-            pack();
-            setBounds(x, y, width, height);
-            setVisible(true);
-            m_bean.loadFromURL(m_sDocURL, null);
-            validate();
-        }
-        else
-        {
-            m_bean = new com.sun.star.comp.beans.OOoBean();
-            m_bean.loadFromURL(m_sDocURL, null);
-            add(m_bean, BorderLayout.CENTER);
-            pack();
-            setBounds(x, y, width, height);
-            setVisible(true);
-            m_bean.aquireSystemWindow();
-        }
-    }
-
-    public WriterFrame() throws Exception
-    {
-        this(0, 0, 800, 400, false);
-    }
-
-    public void setText(String s) throws Exception
-    {
-        com.sun.star.frame.XModel model = (com.sun.star.frame.XModel)m_bean.getDocument();
-        com.sun.star.text.XTextDocument myDoc =
-            (XTextDocument) UnoRuntime.queryInterface(com.sun.star.text.XTextDocument.class,
-                                                      model);
-        com.sun.star.text.XText xText = myDoc.getText();
-        com.sun.star.text.XTextCursor xTCursor = xText.createTextCursor();
-        //inserting some Text
-        xText.insertString( xTCursor, s, false );
-    }
-
-    public String getText() throws Exception
-    {
-        com.sun.star.frame.XModel model = (com.sun.star.frame.XModel)m_bean.getDocument();
-        com.sun.star.text.XTextDocument myDoc =
-            (XTextDocument) UnoRuntime.queryInterface(com.sun.star.text.XTextDocument.class,
-                                                      model);
-        com.sun.star.text.XText xText = myDoc.getText();
-        return xText.getString();
-    }
-
-    public void dispose() {
-        m_bean.stopOOoConnection();
-        setVisible(false);
-        super.dispose();
-    }
-
-    OOoBean getBean()
-    {
-        return m_bean;
-    }
-
-    /** Makes sure the document is displayed at the beginning.
-     * This is important for comparing screenshots.
-     */
-    public void goToStart() throws Exception
-    {
-        com.sun.star.frame.XModel xModel = (com.sun.star.frame.XModel)m_bean.getDocument();
-        com.sun.star.frame.XController xController = xModel.getCurrentController();
-
-        com.sun.star.text.XTextViewCursorSupplier xVCSupplier =
-            (com.sun.star.text.XTextViewCursorSupplier) UnoRuntime.queryInterface (
-               com.sun.star.text.XTextViewCursorSupplier.class, xController );
-
-        com.sun.star.text.XTextViewCursor xTViewCursor = xVCSupplier.getViewCursor ( );
-        xTViewCursor.gotoStart(false);
-    }
-
-
-    public void pageDown() throws Exception
-    {
-        com.sun.star.frame.XModel xModel = (com.sun.star.frame.XModel)m_bean.getDocument();
-        com.sun.star.frame.XController xController = xModel.getCurrentController();
-
-        com.sun.star.text.XTextViewCursorSupplier xVCSupplier =
-            (com.sun.star.text.XTextViewCursorSupplier) UnoRuntime.queryInterface (
-               com.sun.star.text.XTextViewCursorSupplier.class, xController );
-        com.sun.star.text.XTextViewCursor xTViewCursor = xVCSupplier.getViewCursor ( );
-        com.sun.star.view.XScreenCursor xScreenCursor =
-            (com.sun.star.view.XScreenCursor) UnoRuntime.queryInterface (
-               com.sun.star.view.XScreenCursor.class, xTViewCursor );
-        xScreenCursor.screenDown();
-    }
-
-    public Rectangle getClientArea()
-    {
-
-        Insets i = getInsets();
-        Rectangle r = getBounds();
-        Rectangle rc = new Rectangle(r.x + i.left, r.y + i.top,
-                                     r.width - i.left - i.right,
-                                     r.height - i.top - i.bottom);
-        return rc;
-    }
-
-    public Rectangle getUnoFramePosition() throws Exception
-    {
-        com.sun.star.awt.XWindow win = m_bean.getFrame().getContainerWindow();
-        com.sun.star.awt.Rectangle rect = win.getPosSize();
-        return new Rectangle(rect.X, rect.Y, rect.Width, rect.Height);
-    }
-
-    /** After resizing the Java frame, the UNO window shall be resized
-     * as well, which is checked by this method.
-     */
-    public boolean checkUnoFramePosition() throws Exception
-    {
-        Rectangle client = getClientArea();
-        Rectangle unoWin = getUnoFramePosition();
-
-        if (client.x != unoWin.x
-            || client.y != unoWin.y
-            || client.width != unoWin.width
-            || client.height != unoWin.height)
-        {
-            System.out.println("\nPosition of client are of Java frame does not match the postion" +
-                               "of the UNO window. These are the values of Java frame, followed by" +
-                               "the UNO window: ");
-            System.out.println(client);
-            System.out.println(unoWin);
-            System.out.println("");
-            return false;
-        }
-
-        return true;
-    }
-
-    public void removeOOoBean() throws Exception
-    {
-        //OOoBean.releaseSystemWindow need not be called because
-        //LocalOfficeWindow overrides removeNotify.
-        //However because of bt4745222 which was fixed in 1.4.2_04,
-        //this is very very slow. The workaround is use releaseSystemWindow
-        //beforehand.
-        m_bean.releaseSystemWindow();
-        remove(m_bean);
-    }
-
-    public void addOOoBean() throws Exception
-    {
-        add(m_bean, BorderLayout.CENTER);
-        m_bean.aquireSystemWindow();
-        validate();
-    }
-
-}
-
diff --git a/bean/qa/complex/bean/OOoBeanTest.java b/bean/qa/complex/bean/OOoBeanTest.java
new file mode 100644
index 000000000000..69c63e11a91a
--- /dev/null
+++ b/bean/qa/complex/bean/OOoBeanTest.java
@@ -0,0 +1,737 @@
+/*************************************************************************
+ *
+ * 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
+ * 
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+package complex.bean;
+
+
+// import complexlib.ComplexTestCase;
+import com.sun.star.lang.XMultiServiceFactory;
+import java.awt.event.*;
+import java.awt.event.KeyEvent;
+import com.sun.star.comp.beans.OOoBean;
+import com.sun.star.uno.UnoRuntime;
+
+import java.awt.*;
+
+// 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.*;
+
+class PrivateLocalOfficeConnection extends com.sun.star.comp.beans.LocalOfficeConnection
+{
+    public PrivateLocalOfficeConnection(com.sun.star.uno.XComponentContext xContext)
+    {
+        super(xContext);
+    }
+}
+
+public class OOoBeanTest
+{
+
+//    public String[] getTestMethodNames()
+//    {
+//        // TODO think about trigger of sub-tests from outside
+//        return new String[]
+//        {
+//              "test1",
+//              "test2",
+//              "test3",
+//              "test4",
+//              "test5",
+//              "test6",
+//              "test6a",
+//              "test7",
+//              "test8"
+//        };
+//    }
+
+    /** For X-Windows we need to prolong the time between painting windows. Because
+        it takes longer than on Windows.
+    */
+    private int getSleepTime(int time)
+    {
+        int ret = time;
+        if (isWindows() == false)
+        {
+            return time * 5;
+        }
+        return time;
+    }
+
+    /** If it cannot be determined if we run on Windows then we assume
+        that we do not.
+    */
+    private boolean isWindows()
+    {
+        boolean ret = false;
+        String os = System.getProperty("os.name");
+        if (os != null)
+        {
+            os = os.trim();
+            if (os.toLowerCase().indexOf("win") == 0)
+            {
+                ret = true;
+            }
+        }
+        return ret;
+    }
+
+    private String getText(OOoBean bean) throws Exception
+    {
+        com.sun.star.frame.XModel model = (com.sun.star.frame.XModel)bean.getDocument();
+        com.sun.star.text.XTextDocument myDoc =
+            UnoRuntime.queryInterface(com.sun.star.text.XTextDocument.class, model);
+        com.sun.star.text.XText xText = myDoc.getText();
+        return xText.getString();
+    }
+
+    /** 1.Create a Java frame
+     *  2.Add OOoBean (no document loaded yet)
+     *  3.Show frame
+     *  4.Load document
+     * @throws Exception
+     */
+    @Test public void test1() throws Exception
+    {
+        WriterFrame f = null;
+        try
+        {
+            f = new WriterFrame(100 ,100, 500 ,400, false, connection.getComponentContext());
+            f.setText("OOoBean test.");
+            Thread.sleep(1000);
+        }
+        finally
+        {
+            if (f != null)
+            {
+                f.dispose();
+            }
+        }
+    }
+
+    /** Sizing, painting
+     * @throws Exception
+     */
+    @Test public void test2() throws Exception
+    {
+        WriterFrame f = null;
+        ScreenComparer capturer = null;
+        try
+        {
+            f = new WriterFrame(100, 100, 500,500, false, connection.getComponentContext());
+            if (f.checkUnoFramePosition() == false)
+            {
+                fail("Sizing error: Client are of Java frame does not match the UNO window.");
+            }
+            capturer = new ScreenComparer(100, 100, 500, 500);
+
+            //Minimize Window and back
+            f.goToStart();
+            f.pageDown();
+            Thread.sleep(1000);
+            for (int i = 0; i < 3; i++)
+            {
+                capturer.reset();
+                capturer.grabOne(f.getClientArea());
+                f.setExtendedState(Frame.ICONIFIED);
+                Thread.sleep(getSleepTime(200));
+                if (f.checkUnoFramePosition() == false)
+                {
+                    fail("Sizing error: Frame was iconified.");
+                }
+                f.setExtendedState(Frame.NORMAL);
+                Thread.sleep(getSleepTime(200));
+                if (f.checkUnoFramePosition() == false)
+                {
+                    fail("Sizing error: Frame size set back to normal after it was iconified.");
+                }
+                capturer.grabTwo(f.getClientArea());
+                if (capturer.compare() == false)
+                {
+                    fail("Painting error: Minimize (iconify) frame and back to normal size.");
+                    capturer.writeImages();
+                }
+            }
+
+            //Maximize Window and back to normal
+            for (int i = 0; i < 3; i++)
+            {
+                capturer.reset();
+                capturer.grabOne(f.getClientArea());
+                f.setExtendedState(Frame.MAXIMIZED_BOTH);
+                Thread.sleep(getSleepTime(200));
+                if (f.checkUnoFramePosition() == false)
+                {
+                    fail("Sizing error: Frame maximized.");
+                }
+                f.setExtendedState(Frame.NORMAL);
+                Thread.sleep(getSleepTime(200));
+                if (f.checkUnoFramePosition() == false)
+                {
+                    fail("Sizing error: Frame set from maximized to normal.");
+                }
+                capturer.grabTwo(f.getClientArea());
+                if (capturer.compare() == false)
+                {
+                    fail("Painting error: Maximize frame and back to normal size");
+                    capturer.writeImages();
+                }
+            }
+
+            //move Window top left
+            capturer.reset();
+            capturer.grabOne(f.getClientArea());
+            Rectangle oldPosition = f.getBounds();
+            f.setBounds(0, 0, oldPosition.width, oldPosition.height);
+            Thread.sleep(getSleepTime(200));
+            if (f.checkUnoFramePosition() == false)
+            {
+                fail("Sizing error: Frame moved.");
+            }
+
+            capturer.grabTwo(f.getClientArea());
+            if (capturer.compare() == false)
+            {
+                fail("Painting error: Move frame to a different position.");
+                capturer.writeImages();
+            }
+
+            //move Window down
+            Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
+            int maxY = dim.height - f.getBounds().height;
+
+            int curY = 0;
+            while (curY < maxY)
+            {
+                capturer.reset();
+                capturer.grabOne(f.getClientArea());
+                oldPosition = f.getBounds();
+                f.setBounds(0, curY, oldPosition.width, oldPosition.height);
+                capturer.grabTwo(f.getClientArea());
+                if (capturer.compare() == false)
+                {
+                    fail("Painting error: Move frame to a different position.");
+                    capturer.writeImages();
+                }
+                curY+= 50;
+                Thread.sleep(getSleepTime(200));
+            }
+
+            //obscure the window and make it visible again
+
+            oldPosition = f.getBounds();
+
+            Rectangle pos = new Rectangle(oldPosition.x - 50, oldPosition.y - 50,
+                                          oldPosition.width, oldPosition.height);
+            Frame coverFrame = new Frame();
+            coverFrame.setBounds(pos);
+            capturer.reset();
+            capturer.grabOne(f.getClientArea());
+
+            for (int i = 0; i < 3; i++)
+            {
+                coverFrame.setVisible(true);
+                Thread.sleep(getSleepTime(200));
+                f.toFront();
+                Thread.sleep(getSleepTime(200));
+                if (f.checkUnoFramePosition() == false)
+                {
+                    fail("Sizing error: Frame moved from back to front.");
+                }
+
+                capturer.grabTwo(f.getClientArea());
+                if (capturer.compare() == false)
+                {
+                    fail("Painting error: Move frame to back and to front.");
+                    capturer.writeImages();
+                }
+            }
+
+            coverFrame.dispose();
+        }
+        finally
+        {
+            if (f != null)
+            {
+                f.dispose();
+            }
+        }
+    }
+
+    /**
+       1. Create a OOoBean
+       2. Load a document
+       3. Create Frame (do not show yet)
+       4. Add OOoBean to Frame
+       5. Show Frame
+     * @throws Exception
+     */
+    @Test public void test3() throws Exception
+    {
+        WriterFrame f = null;
+        try
+        {
+            f = new WriterFrame(100, 100, 500, 300, true, connection.getComponentContext());
+            if (f.checkUnoFramePosition() == false)
+            {
+                fail("Sizing error.");
+            }
+
+        }
+        finally
+        {
+            if (f != null)
+            {
+                f.dispose();
+            }
+        }
+    }
+
+    /** Test repeated OOoBean.aquireSystemWindow and OOoBean.releaseSystemWindow
+     * calls.
+     * @throws Exception
+     */
+    @Test public void test4() throws Exception
+    {
+        WriterFrame f = null;
+        try
+        {
+            f = new WriterFrame(100, 100, 500, 300, false, connection.getComponentContext());
+            OOoBean b = f.getBean();
+            for (int i = 0; i < 100; i++)
+            {
+                b.releaseSystemWindow();
+                b.aquireSystemWindow();
+            }
+            if (f.checkUnoFramePosition() == false)
+            {
+                fail("Sizing error.");
+            }
+        }
+        finally
+        {
+            if (f != null)
+            {
+                f.dispose();
+            }
+            if (isWindows() == false)
+            {
+                Thread.sleep(10000);
+            }
+        }
+    }
+
+    /** Adding and removing the bean to a Java frame multiple times.
+     * Test painting and sizing.
+     * @throws Exception
+     */
+    @Test public void test5() throws Exception
+    {
+        WriterFrame f = null;
+        try
+        {
+            f = new WriterFrame(100, 100, 500, 400, false, connection.getComponentContext());
+            f.goToStart();
+            f.pageDown();
+            Thread.sleep(1000);
+
+            ScreenComparer capturer = new ScreenComparer(100,100,500,400);
+            capturer.grabOne();
+            for (int i = 0; i < 100; i++)
+            {
+                f.removeOOoBean();
+                f.addOOoBean();
+            }
+
+            f.goToStart();
+            f.pageDown();
+            Thread.sleep(getSleepTime(200));
+            capturer.grabTwo();
+
+            if (capturer.compare() == false)
+            {
+                fail("Painting error: adding and removing OOoBean " +
+                       "repeatedly to java.lang.Frame.");
+                capturer.writeImages();
+            }
+
+            if (f.checkUnoFramePosition() == false)
+            {
+                fail("Sizing error.");
+            }
+
+        }
+        finally
+        {
+            if (f != null)
+            {
+                f.dispose();
+            }
+            if (isWindows() == false)
+            {
+                Thread.sleep(10000);
+            }
+        }
+    }
+
+
+    /** Test focus  (i49454). After repeatedly adding and removing the bean to a window
+     * it should still be possible to enter text in the window. This does not
+     * work all the time on Windows. This is probably a timing problem. When using
+     * Thread.sleep (position #1) then it should work.
+     * @throws Exception
+     */
+    @Test public void test6() throws Exception
+    {
+        for (int j = 0; j < 10; j++)
+        {
+            final OOoBean bean = new OOoBean(new PrivateLocalOfficeConnection(connection.getComponentContext()));
+            java.awt.Frame frame = null;
+            bean.setOOoCallTimeOut(10000);
+            try {
+                frame = new java.awt.Frame("OpenOffice.org Demo");
+                frame.add(bean, BorderLayout.CENTER);
+                frame.pack();
+                frame.setSize(600,300);
+                frame.show();
+                bean.loadFromURL("private:factory/swriter", null);
+                // #1
+                Thread.sleep(1000);
+
+                StringBuffer buf = new StringBuffer(1000);
+                for (int i = 0; i < 1; i++)
+                {
+//                    Thread.sleep(1000);
+                    bean.releaseSystemWindow();
+                    frame.remove(bean);
+//                    frame.validate();
+//                    Thread.sleep(1000);
+                    frame.add(bean, BorderLayout.CENTER);
+                    bean.aquireSystemWindow();
+//                    frame.validate();
+                }
+
+                if (isWindows() == false)
+                {
+                    Thread.sleep(5000);
+                }
+
+                Robot roby = new Robot();
+                roby.keyPress(KeyEvent.VK_H);
+                roby.keyRelease(KeyEvent.VK_H);
+                buf.append("h");
+
+                String s = getText(bean);
+                if ( ! s.equals(buf.toString()))
+                {
+                    fail("Focus error: After removing and adding the bean, the" +
+                           "office window does not receive keyboard input.\n" +
+                           "Try typing in the window, you've got 30s!!! This " +
+                           "test may not work with Linux/Solaris");
+                    Thread.sleep(30000);
+                    break;
+                }
+                else
+                {
+                    Thread.sleep(2000);
+                }
+
+            } finally {
+                bean.stopOOoConnection();
+                frame.dispose();
+            }
+        }
+    }
+
+    /** Tests focus problem just like test6, but the implementation is a little
+     * different. The bean is added and removed from withing the event dispatch
+     * thread. Using Thread.sleep at various points (#1, #2, #3) seems to workaround
+     * the problem.
+     * @throws Exception
+     */
+    @Test public void test6a() throws Exception
+    {
+        for (int j = 0; j < 50; j++)
+        {
+            final OOoBean bean = new OOoBean(new PrivateLocalOfficeConnection(connection.getComponentContext()));
+            final java.awt.Frame frame = new Frame("Openoffice.org");
+            bean.setOOoCallTimeOut(10000);
+
+            try {
+                frame.add(bean, BorderLayout.CENTER);
+                frame.pack();
+                frame.setSize(600,400);
+                frame.show();
+                bean.loadFromURL("private:factory/swriter", null);
+                frame.validate();
+                // #1
+                Thread.sleep(1000);
+                StringBuffer buf = new StringBuffer(1000);
+                int i = 0;
+
+                for (; i < 1; i++)
+                {
+                EventQueue q = Toolkit.getDefaultToolkit().getSystemEventQueue();
+                q.invokeAndWait( new Runnable() {
+                        public void run() {
+                            try {
+
+                            bean.releaseSystemWindow();
+                            frame.remove(bean);
+                            frame.validate();
+
+                            } catch (Exception e) {
+                                e.printStackTrace();
+                            }
+
+                            }
+                        });
+                // #2
+                Thread.sleep(1000);
+                q.invokeAndWait( new Runnable() {
+                        public void run() {
+                            try {
+
+                            frame.add(bean, BorderLayout.CENTER);
+                            bean.aquireSystemWindow();
+                            frame.validate();
+                            } catch (Exception e) {
+                                e.printStackTrace();
+                            }
+                            }
+                        });
+
+                // #3
+                Thread.sleep(1000);
+                }
+
+                if (isWindows() == false)
+                {
+                    Thread.sleep(5000);
+                }
+
+                Robot roby = new Robot();
+                roby.mouseMove(300, 200);
+                roby.waitForIdle();
+                roby.mousePress(InputEvent.BUTTON1_MASK);
+                roby.waitForIdle();
+                roby.mouseRelease(InputEvent.BUTTON1_MASK);
+                roby.waitForIdle();
+                roby.keyPress(KeyEvent.VK_H);
+                roby.waitForIdle();
+                roby.keyRelease(KeyEvent.VK_H);
+                roby.waitForIdle();
+
+                buf.append("h");
+                Thread.sleep(1000);
+                String s = getText(bean);
+                System.out.println(" getText: " + s);
+                if ( ! s.equals(buf.toString()))
+                {
+                    roby.mousePress(InputEvent.BUTTON1_MASK);
+                    roby.waitForIdle();
+                    roby.mouseRelease(InputEvent.BUTTON1_MASK);
+                    roby.waitForIdle();
+                    roby.keyPress(KeyEvent.VK_H);
+                    roby.waitForIdle();
+                    roby.keyRelease(KeyEvent.VK_H);
+                    roby.waitForIdle();
+
+                    String sH = "h";
+                    Thread.sleep(1000);
+                    String s2 = getText(bean);
+
+                    if ( ! sH.equals(s2))
+                    {
+                        fail("Focus error: After removing and adding the bean, the" +
+                               "office window does not receive keyboard input.\n" +
+                               "Try typing in the window, you've got 30s!!! This " +
+                               "test may not work with Linux/Solaris");
+                        System.out.println("j: " + j + "   i: " + i);
+                        Thread.sleep(30000);
+                        break;
+                    }
+                }
+                else
+                {
+                    //                   Thread.sleep(2000);
+                }
+
+            } finally {
+                bean.stopOOoConnection();
+                frame.dispose();
+            }
+        }
+    }
+
+    /** Repeatedly loading a document in one and the same OOoBean instance.
+     * @throws Exception
+     */
+    @Test public void test7() throws Exception
+    {
+        WriterFrame f = null;
+        try
+        {
+            f = new WriterFrame(100 ,100, 500 ,400, false, connection.getComponentContext());
+            String text = "OOoBean test.";
+
+            for (int i = 0; i < 10; i++)
+            {
+                f.getBean().clear();
+                f.getBean().loadFromURL("private:factory/swriter", null);
+                f.setText(text);
+                f.goToStart();
+                f.validate();
+
+                if (text.equals(f.getText()) == false)
+                {
+                    fail("Repeated loading of a document failed.");
+                }
+                Thread.sleep(1000);
+            }
+        }
+        finally
+        {
+            if (f != null)
+            {
+                f.dispose();
+            }
+        }
+    }
+
+    /** Using multiple instances of OOoBean at the same time
+     * @throws Exception
+     */
+
+    @Test public void test8() throws Exception
+    {
+        OOoBean bean1 = new OOoBean(new PrivateLocalOfficeConnection(connection.getComponentContext()));
+        BeanPanel bp1 = new BeanPanel(bean1);
+        OOoBean bean2 = new OOoBean(new PrivateLocalOfficeConnection(connection.getComponentContext()));
+        BeanPanel bp2 = new BeanPanel(bean2);
+        OOoBean bean3 = new OOoBean(new PrivateLocalOfficeConnection(connection.getComponentContext()));
+        BeanPanel bp3 = new BeanPanel(bean3);
+        OOoBean bean4 = new OOoBean(new PrivateLocalOfficeConnection(connection.getComponentContext()));
+        BeanPanel bp4 = new BeanPanel(bean4);
+
+        try
+        {
+            Frame f = new Frame("OOoBean example with several instances");
+            f.setLayout(new GridBagLayout());
+            GridBagConstraints c = new GridBagConstraints();
+            c.fill = GridBagConstraints.HORIZONTAL;
+            c.weightx = 0.5;
+
+            c.insets = new Insets(0, 0, 0, 10);
+            c.gridx = 0;
+            c.gridy = 0;
+            f.add(bp1, c);
+
+            c.gridx = 1;
+            c.insets = new Insets(0, 0, 0, 0);
+            f.add(bp2, c);
+
+            c.gridx = 0;
+            c.gridy = 1;
+            c.insets = new Insets(10, 0, 0, 10);
+            f.add(bp3, c);
+
+            c.gridx = 1;
+            c.gridy = 1;
+            c.insets = new Insets(10, 0, 0, 0);
+            f.add(bp4, c);
+
+            f.pack();
+            f.setBounds(0, 0, 1000, 600);
+            f.setVisible(true);
+            try {
+            bean1.loadFromURL("private:factory/swriter", null);
+            bean2.loadFromURL("private:factory/swriter", null);
+            bean3.loadFromURL("private:factory/swriter", null);
+            bean4.loadFromURL("private:factory/swriter", null);
+            } catch( Exception e)
+            {
+                e.printStackTrace();
+            }
+            f.validate();
+
+            Thread.sleep(10000);
+        }
+        finally
+        {
+            bean1.stopOOoConnection();
+            bean2.stopOOoConnection();
+            bean3.stopOOoConnection();
+            bean4.stopOOoConnection();
+        }
+    }
+
+    class BeanPanel extends Panel
+    {
+        public BeanPanel(OOoBean b)
+        {
+            setLayout(new BorderLayout());
+            add(b, BorderLayout.CENTER);
+        }
+        public Dimension getPreferredSize()
+        {
+            Container c = getParent();
+            return new Dimension(200, 200);
+        }
+    }
+
+
+
+
+    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/bean/qa/complex/bean/ScreenComparer.java b/bean/qa/complex/bean/ScreenComparer.java
new file mode 100644
index 000000000000..9bb0a41f40d8
--- /dev/null
+++ b/bean/qa/complex/bean/ScreenComparer.java
@@ -0,0 +1,249 @@
+/*************************************************************************
+ *
+ * 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
+ * 
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+package complex.bean;
+
+
+// import complexlib.ComplexTestCase;
+import java.io.File;
+import java.awt.Rectangle;
+// import java.awt.BorderLayout;
+import java.awt.image.BufferedImage;
+import java.awt.image.PixelGrabber;
+// import java.awt.event.*;
+// import java.awt.Frame;
+import javax.imageio.ImageIO;
+// import javax.imageio.stream.FileImageOutputStream;
+
+
+
+class ScreenComparer
+{
+    Rectangle m_rect;
+    BufferedImage m_img1;
+    BufferedImage m_img2;
+    BufferedImage m_imgDiff;
+
+    int m_diffColor;
+    public ScreenComparer(int x, int y, int width, int height)
+    {
+        this(new Rectangle(x, y, width, height));
+    }
+
+    public ScreenComparer(Rectangle location)
+    {
+        m_rect = location;
+        int red = 0xff;
+        int alpha = 0xff;
+        m_diffColor = (alpha << 24);
+        m_diffColor = m_diffColor | (red << 16);
+    }
+
+    public ScreenComparer()
+    {
+        this(new Rectangle(0, 0, 0, 0));
+    }
+
+    public void reset()
+    {
+        m_rect = null;
+        m_img1 = null;
+        m_img2 = null;
+        m_imgDiff = null;
+    }
+
+    public Rectangle getLocation()
+    {
+        return m_rect;
+    }
+    public void grabOne() throws Exception
+    {
+        grabOne(m_rect);
+    }
+
+    public void grabOne(Rectangle r) throws Exception
+    {
+        java.awt.Robot robot = new java.awt.Robot();
+        m_img1 = robot.createScreenCapture(r);
+    }
+
+    public void grabTwo() throws Exception
+    {
+        grabTwo(m_rect);
+    }
+
+    public void grabTwo(Rectangle r) throws Exception
+    {
+        java.awt.Robot robot = new java.awt.Robot();
+        m_img2 = robot.createScreenCapture(r);
+    }
+
+    public boolean compare() throws Exception
+    {
+        if (m_img1 == null || m_img2 == null)
+        {
+            throw new Exception("Only one image captured!");
+        }
+        boolean ret = true;
+        int w1 = m_img1.getWidth();
+        int h1 = m_img1.getHeight();
+        int w2 = m_img2.getWidth();
+        int h2 = m_img2.getHeight();
+
+        if (w1 != w2 || h1 != h2)
+        {
+            System.out.println("### 1\n");
+            //Different size. Create an image that holds both images.
+            int w = w1 > w2 ? w1 : w2;
+            int h = h1 > h2 ? h1 : h2;
+            m_imgDiff = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
+            for (int y = 0; y < h; y ++)
+            {
+                for (int x = 0; x < w; x++)
+                {
+                    boolean bOutOfRange = false;
+                    int pixel1 = 0;
+                    int pixel2 = 0;
+                    //get the pixel for m_img1
+                    if (x < w1 && y < h1)
+                    {
+                        pixel1 = m_img1.getRGB(x, y);
+                    }
+                    else
+                    {
+                        bOutOfRange = true;
+                    }
+
+                    if (x < w2 && y < h2)
+                    {
+                        pixel2 = m_img2.getRGB(x, y);
+                    }
+                    else
+                    {
+                        bOutOfRange = true;
+                    }
+
+                    if (bOutOfRange || pixel1 != pixel2)
+                    {
+                        m_imgDiff.setRGB(x, y, m_diffColor);
+                    }
+                    else
+                    {
+                        m_imgDiff.setRGB(x, y, pixel1);
+                    }
+
+                }
+            }
+            return false;
+        }
+
+        //Images have same dimension
+        int[] pixels1 = new int[w1 * h1];
+        PixelGrabber pg = new PixelGrabber(
+            m_img1.getSource(), 0, 0, w1, h1, pixels1, 0, w1);
+        pg.grabPixels();
+
+        int[] pixels2 = new int[w2 * h2];
+        PixelGrabber pg2 = new PixelGrabber(
+            m_img2.getSource(), 0, 0, w2, h2, pixels2, 0, w2);
+        pg2.grabPixels();
+
+        m_imgDiff = new BufferedImage(w1, h1, BufferedImage.TYPE_INT_ARGB);
+
+        //First check if the the images differ.
+        int lenAr = pixels1.length;
+        int index = 0;
+        for (index = 0; index < lenAr; index++)
+        {
+            if (pixels1[index] != pixels2[index])
+            {
+                break;
+            }
+        }
+
+        //If the images are different, then create the diff image
+        if (index < lenAr)
+        {
+            for (int y = 0; y < h1; y++)
+            {
+                for (int x = 0; x < w1; x++)
+                {
+                    int offset = y * w1 + x;
+                    if (pixels1[offset] != pixels2[offset])
+                    {
+                        ret = ret && false;
+                        m_imgDiff.setRGB(x, y, m_diffColor);
+                    }
+                    else
+                    {
+                        m_imgDiff.setRGB(x, y, pixels1[offset]);
+                    }
+                }
+            }
+        }
+        return ret;
+    }
+
+    /** Writes Images to a location. The
+     *  directory is determined by the java property OOoBean.Images
+     *
+     */
+    public void writeImages() throws Exception
+    {
+        String imgLocation = System.getProperty("OOoBean.Images", "");
+        File file_tmp = File.createTempFile("OOoBean", "", new File(imgLocation));
+        File file1 = new File(file_tmp.getPath()+".png");
+        file_tmp.delete();
+        if (m_img1 != null)
+        {
+            ImageIO.write(m_img1, "png", file1);
+            System.out.println("\nCompared images:");
+            System.out.println("1. " + file1.getPath());
+        }
+        file1= null;
+        file_tmp= null;
+        file_tmp = File.createTempFile("OOoBean", "", new File(imgLocation));
+        file1 = new File(file_tmp.getPath()+".png");
+        file_tmp.delete();
+        if (m_img2 != null)
+        {
+            ImageIO.write(m_img2, "png", file1);
+            System.out.println("2. " + file1.getPath());
+        }
+        file1= null;
+        file_tmp= null;
+        file_tmp = File.createTempFile("OOoBean", "_diff", new File(imgLocation));
+        file1 = new File(file_tmp.getPath()+".png");
+        file_tmp.delete();
+        if (m_imgDiff != null)
+        {
+            ImageIO.write(m_imgDiff, "png", file1);
+            System.out.println("Diff image: " + file1.getPath() + "\n");
+        }
+    }
+
+}
+
diff --git a/bean/qa/complex/bean/WriterFrame.java b/bean/qa/complex/bean/WriterFrame.java
new file mode 100644
index 000000000000..b4611fb30b1a
--- /dev/null
+++ b/bean/qa/complex/bean/WriterFrame.java
@@ -0,0 +1,210 @@
+/*************************************************************************
+ *
+ * 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
+ * 
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+package complex.bean;
+
+
+// import com.sun.star.comp.beans.LocalOfficeConnection;
+import com.sun.star.uno.XComponentContext;
+import java.awt.Rectangle;
+import java.awt.Insets;
+import java.awt.BorderLayout;
+import com.sun.star.comp.beans.OOoBean;
+import com.sun.star.uno.UnoRuntime;
+
+
+
+class WriterFrame extends java.awt.Frame
+{
+    com.sun.star.comp.beans.OOoBean m_bean;
+    final static String m_sDocURL = "private:factory/swriter";
+
+    /**
+      @param loadBeforeVisible
+          the OOoBean is added to the frame before it is displayable. Then the Java Frame does
+          not have a native window peer yet.
+     */
+    public WriterFrame(int x, int y, int width, int height, boolean loadBeforeVisible, XComponentContext _xConn) throws Exception
+    {
+
+        try
+        {
+            if (loadBeforeVisible == false)
+            {
+                m_bean = new com.sun.star.comp.beans.OOoBean(new PrivateLocalOfficeConnection(_xConn));
+                add(m_bean, BorderLayout.CENTER);
+                pack();
+                setBounds(x, y, width, height);
+                setVisible(true);
+                m_bean.loadFromURL(m_sDocURL, null);
+                validate();
+            }
+            else
+            {
+                m_bean = new com.sun.star.comp.beans.OOoBean(new PrivateLocalOfficeConnection(_xConn));
+                m_bean.loadFromURL(m_sDocURL, null);
+                add(m_bean, BorderLayout.CENTER);
+                pack();
+                setBounds(x, y, width, height);
+                setVisible(true);
+                m_bean.aquireSystemWindow();
+            }
+        }
+        catch (Exception e)
+        {
+            System.out.println("Exception caught: " + e.getMessage());
+        }
+    }
+
+    public WriterFrame() throws Exception
+    {
+        this(0, 0, 800, 400, false, null);
+    }
+
+    public void setText(String s) throws Exception
+    {
+        com.sun.star.frame.XModel model = (com.sun.star.frame.XModel)m_bean.getDocument();
+        com.sun.star.text.XTextDocument myDoc =
+            UnoRuntime.queryInterface(com.sun.star.text.XTextDocument.class, model);
+        com.sun.star.text.XText xText = myDoc.getText();
+        com.sun.star.text.XTextCursor xTCursor = xText.createTextCursor();
+        //inserting some Text
+        xText.insertString( xTCursor, s, false );
+    }
+
+    public String getText() throws Exception
+    {
+        com.sun.star.frame.XModel model = (com.sun.star.frame.XModel)m_bean.getDocument();
+        com.sun.star.text.XTextDocument myDoc =
+            UnoRuntime.queryInterface(com.sun.star.text.XTextDocument.class, model);
+        com.sun.star.text.XText xText = myDoc.getText();
+        return xText.getString();
+    }
+
+    @Override
+    public void dispose() {
+        m_bean.stopOOoConnection();
+        setVisible(false);
+        super.dispose();
+    }
+
+    OOoBean getBean()
+    {
+        return m_bean;
+    }
+
+    /** Makes sure the document is displayed at the beginning.
+     * This is important for comparing screenshots.
+     */
+    public void goToStart() throws Exception
+    {
+        com.sun.star.frame.XModel xModel = (com.sun.star.frame.XModel)m_bean.getDocument();
+        com.sun.star.frame.XController xController = xModel.getCurrentController();
+
+        com.sun.star.text.XTextViewCursorSupplier xVCSupplier =
+            UnoRuntime.queryInterface(com.sun.star.text.XTextViewCursorSupplier.class, xController);
+
+        com.sun.star.text.XTextViewCursor xTViewCursor = xVCSupplier.getViewCursor ( );
+        xTViewCursor.gotoStart(false);
+    }
+
+
+    public void pageDown() throws Exception
+    {
+        com.sun.star.frame.XModel xModel = (com.sun.star.frame.XModel)m_bean.getDocument();
+        com.sun.star.frame.XController xController = xModel.getCurrentController();
+
+        com.sun.star.text.XTextViewCursorSupplier xVCSupplier =
+            UnoRuntime.queryInterface(com.sun.star.text.XTextViewCursorSupplier.class, xController);
+        com.sun.star.text.XTextViewCursor xTViewCursor = xVCSupplier.getViewCursor ( );
+        com.sun.star.view.XScreenCursor xScreenCursor =
+            UnoRuntime.queryInterface(com.sun.star.view.XScreenCursor.class, xTViewCursor);
+        xScreenCursor.screenDown();
+    }
+
+    public Rectangle getClientArea()
+    {
+
+        Insets i = getInsets();
+        Rectangle r = getBounds();
+        Rectangle rc = new Rectangle(r.x + i.left, r.y + i.top,
+                                     r.width - i.left - i.right,
+                                     r.height - i.top - i.bottom);
+        return rc;
+    }
+
+    public Rectangle getUnoFramePosition() throws Exception
+    {
+        com.sun.star.awt.XWindow win = m_bean.getFrame().getContainerWindow();
+        com.sun.star.awt.Rectangle rect = win.getPosSize();
+        return new Rectangle(rect.X, rect.Y, rect.Width, rect.Height);
+    }
+
+    /** After resizing the Java frame, the UNO window shall be resized
+     * as well, which is checked by this method.
+     */
+    public boolean checkUnoFramePosition() throws Exception
+    {
+        Rectangle client = getClientArea();
+        Rectangle unoWin = getUnoFramePosition();
+
+        if (client.x != unoWin.x
+            || client.y != unoWin.y
+            || client.width != unoWin.width
+            || client.height != unoWin.height)
+        {
+            System.out.println("\nPosition of client are of Java frame does not match the postion" +
+                               "of the UNO window. These are the values of Java frame, followed by" +
+                               "the UNO window: ");
+            System.out.println(client);
+            System.out.println(unoWin);
+            System.out.println("");
+            return false;
+        }
+
+        return true;
+    }
+
+    public void removeOOoBean() throws Exception
+    {
+        //OOoBean.releaseSystemWindow need not be called because
+        //LocalOfficeWindow overrides removeNotify.
+        //However because of bt4745222 which was fixed in 1.4.2_04,
+        //this is very very slow. The workaround is use releaseSystemWindow
+        //beforehand.
+        m_bean.releaseSystemWindow();
+        remove(m_bean);
+    }
+
+    public void addOOoBean() throws Exception
+    {
+        add(m_bean, BorderLayout.CENTER);
+        m_bean.aquireSystemWindow();
+        validate();
+    }
+
+}
+
diff --git a/bean/qa/complex/bean/makefile.mk b/bean/qa/complex/bean/makefile.mk
new file mode 100644
index 000000000000..257dd6df46ca
--- /dev/null
+++ b/bean/qa/complex/bean/makefile.mk
@@ -0,0 +1,138 @@
+#*************************************************************************
+#
+# 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
+# 
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+    @echo "OOO_SUBSEQUENT_TESTS not set, do nothing."
+.ELSE
+
+PRJ = ../../..
+PRJNAME = bean
+TARGET = qa_complex_bean
+
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = complex/bean
+
+# here store only Files which contain a @Test
+JAVATESTFILES = \
+    OOoBeanTest.java
+
+# put here all other files
+JAVAFILES = $(JAVATESTFILES) \
+     ScreenComparer.java \
+     WriterFrame.java
+
+JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar officebean.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
+
+# subdirectories
+# SUBDIRS         = helper
+
+# Sample how to debug
+# JAVAIFLAGS=-Xdebug  -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y
+
+.END
+
+.INCLUDE: settings.mk
+.INCLUDE: target.mk
+.INCLUDE: installationtest.mk
+
+ALLTAR : javatest
+
+.END
+
+# 
+# 
+# 
+# 
+# PRJ := ..$/..
+# PRJNAME := bean
+# TARGET := test_bean
+# PACKAGE = complex
+# 
+# .INCLUDE: settings.mk
+# 
+# #----- compile .java files -----------------------------------------
+# 
+# JARFILES = officebean.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
+# JAVAFILES       = OOoBeanTest.java ScreenComparer.java WriterFrame.java
+# JAVACLASSFILES	= $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
+# 
+# #----- make a jar from compiled files ------------------------------
+# 
+# MAXLINELENGTH = 100000
+# 
+# JARCLASSDIRS    = $(PACKAGE)
+# JARTARGET       = $(TARGET).jar
+# JARCOMPRESS 	= TRUE
+# 
+# # --- Parameters for the test --------------------------------------
+# 
+# # test base is java complex
+# CT_TESTBASE = -TestBase java_complex
+# 
+# # test looks something like the.full.package.TestName
+# CT_TEST     = -o $(PACKAGE:s\$/\.\).$(JAVAFILES:b)
+# 
+# # start the runner application
+# CT_APP      = org.openoffice.Runner
+# 
+# CT_NOOFFICE = -NoOffice
+# 
+# 
+# OFFICE_CLASSPATH_TMP:=$(foreach,i,$(JARFILES) $(office)$/program$/classes$/$(i)$(PATH_SEPERATOR))
+# 
+# OFFICE_CLASSPATH=$(OFFICE_CLASSPATH_TMP:t"")$(SOLARBINDIR)$/OOoRunner.jar$(PATH_SEPERATOR)$(CLASSDIR)
+# 
+# OOOBEAN_OPTIONS=-Dcom.sun.star.officebean.Options=-norestore -DOOoBean.Images=$(MISC)
+# 
+# 
+# .INCLUDE: target.mk
+# 
+# ALLTAR : RUNINSTRUCTIONS
+# 
+# # --- Targets ------------------------------------------------------
+# 
+# #The OOoBean uses the classpath to find the office installation.
+# #Therefore we must use the jar files from the office.
+# RUN:
+#     java -cp $(OFFICE_CLASSPATH) $(OOOBEAN_OPTIONS) $(CT_APP) $(CT_NOOFFICE) $(CT_TESTBASE) $(CT_TEST)
+# run: RUN
+# 
+# rund:
+#     java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8100 -cp $(OFFICE_CLASSPATH) $(OOOBEAN_OPTIONS) $(CT_APP) $(CT_NOOFFICE) $(CT_TESTBASE) $(CT_TEST)
+# 
+# 
+# 
+# RUNINSTRUCTIONS : 
+#     @echo .
+#     @echo ###########################   N O T E  ######################################
+#     @echo . 
+#     @echo "To run the test you have to provide the office location."
+#     @echo Example:
+#     @echo dmake run office="d:/myOffice"
+#     @echo .
+#   
diff --git a/bean/qa/complex/makefile.mk b/bean/qa/complex/makefile.mk
deleted file mode 100644
index e7b88ce3400c..000000000000
--- a/bean/qa/complex/makefile.mk
+++ /dev/null
@@ -1,95 +0,0 @@
-#*************************************************************************
-#
-# 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
-# 
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ := ..$/..
-PRJNAME := bean
-TARGET := test_bean
-PACKAGE = complex
-
-.INCLUDE: settings.mk
-
-#----- compile .java files -----------------------------------------
-
-JARFILES = officebean.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
-JAVAFILES       = OOoBeanTest.java ScreenComparer.java WriterFrame.java
-JAVACLASSFILES	= $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
-
-#----- make a jar from compiled files ------------------------------
-
-MAXLINELENGTH = 100000
-
-JARCLASSDIRS    = $(PACKAGE)
-JARTARGET       = $(TARGET).jar
-JARCOMPRESS 	= TRUE
-
-# --- Parameters for the test --------------------------------------
-
-# test base is java complex
-CT_TESTBASE = -TestBase java_complex
-
-# test looks something like the.full.package.TestName
-CT_TEST     = -o $(PACKAGE:s\$/\.\).$(JAVAFILES:b)
-
-# start the runner application
-CT_APP      = org.openoffice.Runner
-
-CT_NOOFFICE = -NoOffice
-
-
-OFFICE_CLASSPATH_TMP:=$(foreach,i,$(JARFILES) $(office)$/program$/classes$/$(i)$(PATH_SEPERATOR))
-
-OFFICE_CLASSPATH=$(OFFICE_CLASSPATH_TMP:t"")$(SOLARBINDIR)$/OOoRunner.jar$(PATH_SEPERATOR)$(CLASSDIR)
-
-OOOBEAN_OPTIONS=-Dcom.sun.star.officebean.Options=-norestore -DOOoBean.Images=$(MISC)
-
-
-.INCLUDE: target.mk
-
-ALLTAR : RUNINSTRUCTIONS
-
-# --- Targets ------------------------------------------------------
-
-#The OOoBean uses the classpath to find the office installation.
-#Therefore we must use the jar files from the office.
-RUN:
-    java -cp $(OFFICE_CLASSPATH) $(OOOBEAN_OPTIONS) $(CT_APP) $(CT_NOOFFICE) $(CT_TESTBASE) $(CT_TEST)
-run: RUN
-
-rund:
-    java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8100 -cp $(OFFICE_CLASSPATH) $(OOOBEAN_OPTIONS) $(CT_APP) $(CT_NOOFFICE) $(CT_TESTBASE) $(CT_TEST)
-
-
-
-RUNINSTRUCTIONS : 
-    @echo .
-    @echo ###########################   N O T E  ######################################
-    @echo . 
-    @echo "To run the test you have to provide the office location."
-    @echo Example:
-    @echo dmake run office="d:/myOffice"
-    @echo .
-  
-- 
cgit 


From 70670992422a1dc2531f03e36df99b0f65b4ec7d Mon Sep 17 00:00:00 2001
From: Lars Langhans 
Date: Thu, 17 Jun 2010 12:39:47 +0200
Subject: sb123:#i111449# cleanups in forms qa/complex tests

---
 forms/prj/build.lst                             |   1 +
 forms/qa/complex/forms/CheckOGroupBoxModel.java | 203 ++++++++++++++++--------
 forms/qa/complex/forms/makefile.mk              | 117 +++++++++-----
 3 files changed, 220 insertions(+), 101 deletions(-)

diff --git a/forms/prj/build.lst b/forms/prj/build.lst
index cc71868b734d..2d7c5f49c7e5 100644
--- a/forms/prj/build.lst
+++ b/forms/prj/build.lst
@@ -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/qa/complex/forms/CheckOGroupBoxModel.java b/forms/qa/complex/forms/CheckOGroupBoxModel.java
index 8a2ae5c7f0e4..490a2ae695c5 100755
--- 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 tNames = new Vector();
 
-        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..c1c6ee0db66c 100755
--- a/forms/qa/complex/forms/makefile.mk
+++ b/forms/qa/complex/forms/makefile.mk
@@ -25,54 +25,97 @@
 #
 #*************************************************************************
 
-PRJ = ..$/..$/..
-TARGET  = CheckOGroupBoxModel
-PRJNAME = $(TARGET)
-PACKAGE = complex$/forms
-
-# --- Settings -----------------------------------------------------
-.INCLUDE: settings.mk
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+    @echo "OOO_SUBSEQUENT_TESTS not set, do nothing."
+.ELSE
 
+PRJ = ../../..
+PRJNAME = forms
+TARGET = qa_complex_forms
 
-#----- compile .java files -----------------------------------------
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = complex/forms
 
-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)
+# here store only Files which contain a @Test
+JAVATESTFILES = \
+    CheckOGroupBoxModel.java
 
-#----- make a jar from compiled files ------------------------------
+# put here all other files
+JAVAFILES = $(JAVATESTFILES) 
 
-MAXLINELENGTH = 100000
 
-JARCLASSDIRS    = $(PACKAGE)
+JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
 
-# --- Parameters for the test --------------------------------------
+# subdirectories
+# SUBDIRS         = helper
 
-# 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
+# Sample how to debug
+# JAVAIFLAGS=-Xdebug  -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y
 
-# test base is java complex
-CT_TESTBASE = -TestBase java_complex
+.END
 
-# build up package name with "." instead of $/
-CT_PACKAGE     = -o $(PACKAGE:s\$/\.\)
-
-# 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)
-- 
cgit 


From abce795656e5428085eaa1bf1f14ae2615bb0f0b Mon Sep 17 00:00:00 2001
From: Lars Langhans 
Date: Tue, 29 Jun 2010 13:43:23 +0200
Subject: sb123:#i111449# makefile cleanups for qa/complex tests

---
 bean/qa/complex/bean/makefile.mk   | 1 -
 forms/qa/complex/forms/makefile.mk | 1 -
 2 files changed, 2 deletions(-)

diff --git a/bean/qa/complex/bean/makefile.mk b/bean/qa/complex/bean/makefile.mk
index 257dd6df46ca..f0bec2633c00 100644
--- a/bean/qa/complex/bean/makefile.mk
+++ b/bean/qa/complex/bean/makefile.mk
@@ -26,7 +26,6 @@
 #*************************************************************************
 .IF "$(OOO_SUBSEQUENT_TESTS)" == ""
 nothing .PHONY:
-    @echo "OOO_SUBSEQUENT_TESTS not set, do nothing."
 .ELSE
 
 PRJ = ../../..
diff --git a/forms/qa/complex/forms/makefile.mk b/forms/qa/complex/forms/makefile.mk
index c1c6ee0db66c..8fbbab84feae 100755
--- a/forms/qa/complex/forms/makefile.mk
+++ b/forms/qa/complex/forms/makefile.mk
@@ -27,7 +27,6 @@
 
 .IF "$(OOO_SUBSEQUENT_TESTS)" == ""
 nothing .PHONY:
-    @echo "OOO_SUBSEQUENT_TESTS not set, do nothing."
 .ELSE
 
 PRJ = ../../..
-- 
cgit 


From be654dc8132ca8683e37d8babec6550f8d060a0a Mon Sep 17 00:00:00 2001
From: sb 
Date: Fri, 2 Jul 2010 11:44:44 +0200
Subject: sb126: #i112871# missing parentheses around || within &&

---
 crashrep/source/unx/main.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/crashrep/source/unx/main.cxx b/crashrep/source/unx/main.cxx
index afdba0afeebc..7579de78ec94 100755
--- a/crashrep/source/unx/main.cxx
+++ b/crashrep/source/unx/main.cxx
@@ -129,12 +129,12 @@ static string trim_string( const string& rString )
 {
     string temp = rString;
 
-    while ( temp.length() && temp[0] == ' ' || temp[0] == '\t' )
+    while ( temp.length() && (temp[0] == ' ' || temp[0] == '\t') )
         temp.erase( 0, 1 );
 
     string::size_type   len = temp.length();
 
-    while ( len && temp[len-1] == ' ' || temp[len-1] == '\t' )
+    while ( len && (temp[len-1] == ' ' || temp[len-1] == '\t') )
     {
         temp.erase( len - 1, 1 );
         len = temp.length();
-- 
cgit 


From 85900d0c1f194d7220bad74f70200cd2d520de22 Mon Sep 17 00:00:00 2001
From: Lars Langhans 
Date: Mon, 23 Aug 2010 10:38:44 +0200
Subject: sb123:#i111449# remove all subdirs in complex tests

---
 bean/qa/complex/bean/makefile.mk   | 3 ---
 forms/qa/complex/forms/makefile.mk | 3 ---
 2 files changed, 6 deletions(-)

diff --git a/bean/qa/complex/bean/makefile.mk b/bean/qa/complex/bean/makefile.mk
index f0bec2633c00..9a21e52ac916 100644
--- a/bean/qa/complex/bean/makefile.mk
+++ b/bean/qa/complex/bean/makefile.mk
@@ -47,9 +47,6 @@ JAVAFILES = $(JAVATESTFILES) \
 JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar officebean.jar
 EXTRAJARFILES = $(OOO_JUNIT_JAR)
 
-# subdirectories
-# SUBDIRS         = helper
-
 # Sample how to debug
 # JAVAIFLAGS=-Xdebug  -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y
 
diff --git a/forms/qa/complex/forms/makefile.mk b/forms/qa/complex/forms/makefile.mk
index 8fbbab84feae..c5895b708fb1 100755
--- a/forms/qa/complex/forms/makefile.mk
+++ b/forms/qa/complex/forms/makefile.mk
@@ -47,9 +47,6 @@ JAVAFILES = $(JAVATESTFILES)
 JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar
 EXTRAJARFILES = $(OOO_JUNIT_JAR)
 
-# subdirectories
-# SUBDIRS         = helper
-
 # Sample how to debug
 # JAVAIFLAGS=-Xdebug  -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y
 
-- 
cgit 


From e8acc62922943b8d0bcecc9699c34901bdac2809 Mon Sep 17 00:00:00 2001
From: sb 
Date: Fri, 16 Jul 2010 16:57:09 +0200
Subject: sb123: #i113201# disabled
 forms.OEditModel::com::sun::star::form::validation::XValidatableFormComponent
 for now

---
 forms/qa/unoapi/knownissues.xcl | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/forms/qa/unoapi/knownissues.xcl b/forms/qa/unoapi/knownissues.xcl
index 2e10a269c681..09c1dee86d72 100644
--- a/forms/qa/unoapi/knownissues.xcl
+++ b/forms/qa/unoapi/knownissues.xcl
@@ -125,5 +125,8 @@ forms.OFileControlModel::com::sun::star::form::FormControlModel
 forms.OImageControlModel::com::sun::star::beans::XMultiPropertySet
 forms.OImageControlModel::com::sun::star::beans::XPropertySet
 
+### i113201 ###
+forms.OEditModel::com::sun::star::form::validation::XValidatableFormComponent
+
 ### i111333 ###
 forms.OImageControlControl::com::sun::star::awt::XControl
-- 
cgit 


From c7896e24ec34b87aba39e8b2ff19a21fe0c518a6 Mon Sep 17 00:00:00 2001
From: "Thomas Lange [tl]" 
Date: Wed, 21 Jul 2010 16:29:56 +0200
Subject: cws tl82: #i113293# unify encoding detection for linguistic
 components

---
 .../hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx   | 839 +++++++++++----------
 .../hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx   |  94 +--
 lingucomponent/source/lingutil/lingutil.cxx        |  21 +
 lingucomponent/source/lingutil/lingutil.hxx        |   8 +
 .../source/spellcheck/macosxspell/macspellimp.hxx  |  93 +--
 .../source/spellcheck/spell/sspellimp.cxx          | 298 ++++----
 .../source/spellcheck/spell/sspellimp.hxx          |  90 +--
 .../source/thesaurus/libnth/nthesdta.hxx           |  22 +-
 .../source/thesaurus/libnth/nthesimp.cxx           | 456 +++++------
 .../source/thesaurus/libnth/nthesimp.hxx           |  53 +-
 10 files changed, 930 insertions(+), 1044 deletions(-)
 mode change 100644 => 100755 lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx
 mode change 100644 => 100755 lingucomponent/source/lingutil/lingutil.cxx
 mode change 100644 => 100755 lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx
 mode change 100644 => 100755 lingucomponent/source/spellcheck/spell/sspellimp.cxx
 mode change 100644 => 100755 lingucomponent/source/spellcheck/spell/sspellimp.hxx
 mode change 100644 => 100755 lingucomponent/source/thesaurus/libnth/nthesdta.hxx
 mode change 100644 => 100755 lingucomponent/source/thesaurus/libnth/nthesimp.cxx
 mode change 100644 => 100755 lingucomponent/source/thesaurus/libnth/nthesimp.hxx

diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
index 3b0871cc36b6..43c22d0b84a4 100755
--- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
+++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
@@ -32,7 +32,6 @@
 #include 
 #include 
 
-//#include 
 #include    // helper for factories
 #include 
 #include 
@@ -43,10 +42,7 @@
 #include 
 
 #include 
-
-#ifndef _HYPHENIMP_HXX
 #include 
-#endif
 
 #include 
 #include 
@@ -97,9 +93,8 @@ Hyphenator::Hyphenator() :
 {
     bDisposing = FALSE;
     pPropHelper = NULL;
-        aDicts = NULL;
-        numdict = 0;
-
+    aDicts = NULL;
+    numdict = 0;
 }
 
 
@@ -108,21 +103,22 @@ Hyphenator::~Hyphenator()
     if (pPropHelper)
         pPropHelper->RemoveAsPropListener();
 
-        if ((numdict) && (aDicts)) {
-      for (int i=0; i < numdict; i++) {
+    if ((numdict) && (aDicts))
+    {
+        for (int i=0; i < numdict; i++)
+        {
             if (aDicts[i].apCC) delete aDicts[i].apCC;
             aDicts[i].apCC = NULL;
-      }
+        }
     }
-        if (aDicts) delete[] aDicts;
+    if (aDicts) delete[] aDicts;
     aDicts = NULL;
-        numdict = 0;
+    numdict = 0;
 }
 
 
 PropertyHelper_Hyphen & Hyphenator::GetPropHelper_Impl()
 {
-
     if (!pPropHelper)
     {
         Reference< XPropertySet >   xPropSet( GetLinguProperties(), UNO_QUERY );
@@ -212,12 +208,7 @@ Sequence< Locale > SAL_CALL Hyphenator::getLocales()
 
             // add dictionary information
             aDicts = new HDInfo[numdict];
-/*
-            aTEncs  = new rtl_TextEncoding [numdict];
-            aTLocs  = new Locale [numdict];
-            aTNames = new OUString [numdict];
-            aCharSetInfo = new CharClass* [numdict];
-*/
+
             k = 0;
             for (aDictIt = aDics.begin();  aDictIt != aDics.end();  ++aDictIt)
             {
@@ -233,7 +224,7 @@ Sequence< Locale > SAL_CALL Hyphenator::getLocales()
                     for (sal_Int32 i = 0;  i < nLocales;  ++i)
                     {
                         aDicts[k].aPtr = NULL;
-                        aDicts[k].aEnc = 0;
+                        aDicts[k].eEnc = RTL_TEXTENCODING_DONTKNOW;
                         aDicts[k].aLoc = MsLangId::convertLanguageToLocale(
                                         MsLangId::convertIsoStringToLanguage( aDictIt->aLocaleNames[i] ));
                         aDicts[k].apCC = new CharClass( aDicts[k].aLoc );
@@ -288,240 +279,268 @@ sal_Bool SAL_CALL Hyphenator::hasLocale(const Locale& rLocale)
 }
 
 
-Reference< XHyphenatedWord > SAL_CALL
-Hyphenator::hyphenate( const ::rtl::OUString& aWord,
-               const ::com::sun::star::lang::Locale& aLocale,
-               sal_Int16 nMaxLeading,
-               const ::com::sun::star::beans::PropertyValues& aProperties )
-               throw (com::sun::star::uno::RuntimeException,
-               com::sun::star::lang::IllegalArgumentException)
+Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const ::rtl::OUString& aWord,
+       const ::com::sun::star::lang::Locale& aLocale,
+       sal_Int16 nMaxLeading,
+       const ::com::sun::star::beans::PropertyValues& aProperties )
+       throw (com::sun::star::uno::RuntimeException, com::sun::star::lang::IllegalArgumentException)
 {
     int nHyphenationPos = -1;
-        int nHyphenationPosAlt = -1;
-        int nHyphenationPosAltHyph = -1;
+    int nHyphenationPosAlt = -1;
+    int nHyphenationPosAltHyph = -1;
     int wordlen;
     char *hyphens;
-        char *lcword;
-        int k = 0;
+    char *lcword;
+    int k = 0;
 
-        PropertyHelper_Hyphen & rHelper = GetPropHelper();
-        rHelper.SetTmpPropVals(aProperties);
+    PropertyHelper_Hyphen & rHelper = GetPropHelper();
+    rHelper.SetTmpPropVals(aProperties);
     sal_Int16 minTrail = rHelper.GetMinTrailing();
     sal_Int16 minLead = rHelper.GetMinLeading();
     sal_Int16 minLen = rHelper.GetMinWordLength();
 
     HyphenDict *dict = NULL;
-        rtl_TextEncoding aEnc = 0;
-        CharClass * pCC = NULL;
+    rtl_TextEncoding eEnc = RTL_TEXTENCODING_DONTKNOW;
+    CharClass * pCC = NULL;
 
     Reference< XHyphenatedWord > xRes;
 
-        k = -1;
-        for (int j = 0; j < numdict; j++)
-          if (aLocale == aDicts[j].aLoc) k = j;
-
-
-        // if we have a hyphenation dictionary matching this locale
-        if (k != -1) {
+    k = -1;
+    for (int j = 0; j < numdict; j++)
+    {
+        if (aLocale == aDicts[j].aLoc)
+            k = j;
+    }
 
+    // if we have a hyphenation dictionary matching this locale
+    if (k != -1)
+    {
         // if this dictinary has not been loaded yet do that
-        if (!aDicts[k].aPtr) {
-
-           OUString DictFN = aDicts[k].aName + A2OU(".dic");
-           OUString dictpath;
+        if (!aDicts[k].aPtr)
+        {
+            OUString DictFN = aDicts[k].aName + A2OU(".dic");
+            OUString dictpath;
 
-           osl::FileBase::getSystemPathFromFileURL( DictFN, dictpath );
-           OString sTmp( OU2ENC( dictpath, osl_getThreadTextEncoding() ) );
+            osl::FileBase::getSystemPathFromFileURL( DictFN, dictpath );
+            OString sTmp( OU2ENC( dictpath, osl_getThreadTextEncoding() ) );
 
 #if defined(WNT)
-        // workaround for Windows specifc problem that the
-        // path length in calls to 'fopen' is limted to somewhat
-        // about 120+ characters which will usually be exceed when
-        // using dictionaries as extensions.
-        sTmp = Win_GetShortPathName( dictpath );
+            // workaround for Windows specifc problem that the
+            // path length in calls to 'fopen' is limted to somewhat
+            // about 120+ characters which will usually be exceed when
+            // using dictionaries as extensions.
+            sTmp = Win_GetShortPathName( dictpath );
 #endif
 
-          if ( ( dict = hnj_hyphen_load ( sTmp.getStr()) ) == NULL )
-          {
-             fprintf(stderr, "Couldn't find file %s\n", OU2ENC(dictpath, osl_getThreadTextEncoding()) );
-             return NULL;
-          }
-           aDicts[k].aPtr = dict;
-               aDicts[k].aEnc = rtl_getTextEncodingFromUnixCharset(dict->cset);
-               if (aDicts[k].aEnc == RTL_TEXTENCODING_DONTKNOW) {
-                  if (strcmp("ISCII-DEVANAGARI", dict->cset) == 0) {
-                     aDicts[k].aEnc = RTL_TEXTENCODING_ISCII_DEVANAGARI;
-                  } else if (strcmp("UTF-8", dict->cset) == 0) {
-                     aDicts[k].aEnc = RTL_TEXTENCODING_UTF8;
-                  }
-               }
+            if ( ( dict = hnj_hyphen_load ( sTmp.getStr()) ) == NULL )
+            {
+               fprintf(stderr, "Couldn't find file %s\n", OU2ENC(dictpath, osl_getThreadTextEncoding()) );
+               return NULL;
+            }
+            aDicts[k].aPtr = dict;
+            aDicts[k].eEnc = getTextEncodingFromCharset(dict->cset);
         }
 
-            // other wise hyphenate the word with that dictionary
-            dict = aDicts[k].aPtr;
-            aEnc = aDicts[k].aEnc;
-            pCC =  aDicts[k].apCC;
+        // other wise hyphenate the word with that dictionary
+        dict = aDicts[k].aPtr;
+        eEnc = aDicts[k].eEnc;
+        pCC =  aDicts[k].apCC;
+
+        // we don't want to work with a default text encoding since following incorrect
+        // results may occur only for specific text and thus may be hard to notice.
+        // Thus better always make a clean exit here if the text encoding is in question.
+        // Hopefully something not working at all will raise proper attention quickly. ;-)
+        DBG_ASSERT( eEnc != RTL_TEXTENCODING_DONTKNOW, "failed to get text encoding! (maybe incorrect encoding string in file)" );
+        if (eEnc == RTL_TEXTENCODING_DONTKNOW)
+            return NULL;
 
-            sal_uInt16 ct = CAPTYPE_UNKNOWN;
-            ct = capitalType(aWord, pCC);
+        sal_uInt16 ct = CAPTYPE_UNKNOWN;
+        ct = capitalType(aWord, pCC);
 
-            // first convert any smart quotes or apostrophes to normal ones
+        // first convert any smart quotes or apostrophes to normal ones
         OUStringBuffer rBuf(aWord);
-            sal_Int32 nc = rBuf.getLength();
-            sal_Unicode ch;
-        for (sal_Int32 ix=0; ix < nc; ix++) {
+        sal_Int32 nc = rBuf.getLength();
+        sal_Unicode ch;
+        for (sal_Int32 ix=0; ix < nc; ix++)
+        {
             ch = rBuf.charAt(ix);
-                if ((ch == 0x201C) || (ch == 0x201D)) rBuf.setCharAt(ix,(sal_Unicode)0x0022);
-                if ((ch == 0x2018) || (ch == 0x2019)) rBuf.setCharAt(ix,(sal_Unicode)0x0027);
-            }
-            OUString nWord(rBuf.makeStringAndClear());
+            if ((ch == 0x201C) || (ch == 0x201D))
+                rBuf.setCharAt(ix,(sal_Unicode)0x0022);
+            if ((ch == 0x2018) || (ch == 0x2019))
+                rBuf.setCharAt(ix,(sal_Unicode)0x0027);
+        }
+        OUString nWord(rBuf.makeStringAndClear());
 
-            // now convert word to all lowercase for pattern recognition
-            OUString nTerm(makeLowerCase(nWord, pCC));
+        // now convert word to all lowercase for pattern recognition
+        OUString nTerm(makeLowerCase(nWord, pCC));
 
-            // now convert word to needed encoding
-            OString encWord(OU2ENC(nTerm,aEnc));
+        // now convert word to needed encoding
+        OString encWord(OU2ENC(nTerm,eEnc));
 
         wordlen = encWord.getLength();
-            lcword = new char[wordlen + 1];
+        lcword = new char[wordlen + 1];
         hyphens = new char[wordlen + 5];
 
-            char ** rep = NULL; // replacements of discretionary hyphenation
-            int * pos = NULL; // array of [hyphenation point] minus [deletion position]
-            int * cut = NULL; // length of deletions in original word
-
-            // copy converted word into simple char buffer
-            strcpy(lcword,encWord.getStr());
-
-            // now strip off any ending periods
-            int n = wordlen-1;
-        while((n >=0) && (lcword[n] == '.')) n--;
-            n++;
-            if (n > 0) {
-           if (hnj_hyphen_hyphenate3(dict, lcword, n, hyphens, NULL, &rep, &pos, &cut,
-            minLead, minTrail, Max(dict->clhmin, Max(dict->clhmin, 2) + Max(0, minLead - Max(dict->lhmin, 2))),
-            Max(dict->crhmin, Max(dict->crhmin, 2) + Max(0, minTrail - Max(dict->rhmin, 2)))))
-           {
-              //whoops something did not work
-              delete[] hyphens;
-                  delete[] lcword;
-                  if (rep) {
-                    for(int j = 0; j < n; j++) {
+        char ** rep = NULL; // replacements of discretionary hyphenation
+        int * pos = NULL; // array of [hyphenation point] minus [deletion position]
+        int * cut = NULL; // length of deletions in original word
+
+        // copy converted word into simple char buffer
+        strcpy(lcword,encWord.getStr());
+
+        // now strip off any ending periods
+        int n = wordlen-1;
+        while((n >=0) && (lcword[n] == '.'))
+            n--;
+        n++;
+        if (n > 0)
+        {
+            const bool bFailed = 0 != hnj_hyphen_hyphenate3( dict, lcword, n, hyphens, NULL,
+                    &rep, &pos, &cut, minLead, minTrail,
+                    Max(dict->clhmin, Max(dict->clhmin, 2) + Max(0, minLead  - Max(dict->lhmin, 2))),
+                    Max(dict->crhmin, Max(dict->crhmin, 2) + Max(0, minTrail - Max(dict->rhmin, 2))) );
+            if (bFailed)
+            {
+                //whoops something did not work
+                delete[] hyphens;
+                delete[] lcword;
+                if (rep)
+                {
+                    for(int j = 0; j < n; j++)
+                    {
                         if (rep[j]) free(rep[j]);
                     }
                     free(rep);
-                  }
-                  if (pos) free(pos);
-                  if (cut) free(cut);
-              return NULL;
-           }
+                }
+                if (pos) free(pos);
+                if (cut) free(cut);
+                return NULL;
             }
+        }
 
-            // now backfill hyphens[] for any removed trailing periods
-            for (int c = n; c < wordlen; c++) hyphens[c] = '0';
-            hyphens[wordlen] = '\0';
+        // now backfill hyphens[] for any removed trailing periods
+        for (int c = n; c < wordlen; c++) hyphens[c] = '0';
+        hyphens[wordlen] = '\0';
 
         INT32 Leading =  GetPosInWordToCheck( aWord, nMaxLeading );
 
         for (INT32 i = 0; i < n; i++)
         {
-                int leftrep = 0;
-                BOOL hit = (n >= minLen);
-                if (!rep || !rep[i] || (i >= n)) {
-                    hit = hit && (hyphens[i]&1) && (i < Leading);
-                    hit = hit && (i >= (minLead-1) );
-                    hit = hit && ((n - i - 1) >= minTrail);
-                } else {
-                    // calculate change character length before hyphenation point signed with '='
-                    for (char * c = rep[i]; *c && (*c != '='); c++) {
-                        if (aEnc == RTL_TEXTENCODING_UTF8) {
-                            if (((unsigned char) *c) >> 6 != 2) leftrep++;
-                        } else leftrep++;
+            int leftrep = 0;
+            BOOL hit = (n >= minLen);
+            if (!rep || !rep[i] || (i >= n))
+            {
+                hit = hit && (hyphens[i]&1) && (i < Leading);
+                hit = hit && (i >= (minLead-1) );
+                hit = hit && ((n - i - 1) >= minTrail);
+            }
+            else
+            {
+                // calculate change character length before hyphenation point signed with '='
+                for (char * c = rep[i]; *c && (*c != '='); c++)
+                {
+                    if (eEnc == RTL_TEXTENCODING_UTF8)
+                    {
+                        if (((unsigned char) *c) >> 6 != 2)
+                            leftrep++;
                     }
-                    hit = hit && (hyphens[i]&1) && ((i + leftrep - pos[i]) < Leading);
-                    hit = hit && ((i + leftrep - pos[i]) >= (minLead-1) );
-                    hit = hit && ((n - i - 1 + sal::static_int_cast< sal_sSize >(strlen(rep[i])) - leftrep - 1) >= minTrail);
+                    else
+                        leftrep++;
                 }
-            if (hit) {
-            nHyphenationPos = i;
-                    if (rep && (i < n) && rep[i]) {
-                        nHyphenationPosAlt = i - pos[i];
-                        nHyphenationPosAltHyph = i + leftrep - pos[i];
-                    }
+                hit = hit && (hyphens[i]&1) && ((i + leftrep - pos[i]) < Leading);
+                hit = hit && ((i + leftrep - pos[i]) >= (minLead-1) );
+                hit = hit && ((n - i - 1 + sal::static_int_cast< sal_sSize >(strlen(rep[i])) - leftrep - 1) >= minTrail);
+            }
+            if (hit)
+            {
+                nHyphenationPos = i;
+                if (rep && (i < n) && rep[i])
+                {
+                    nHyphenationPosAlt = i - pos[i];
+                    nHyphenationPosAltHyph = i + leftrep - pos[i];
                 }
-         }
-
-         if (nHyphenationPos  == -1) {
-             xRes = NULL;
-             } else {
-                if (rep && rep[nHyphenationPos]) {
-                    // remove equal sign
-                    char * s = rep[nHyphenationPos];
-                    int eq = 0;
-                    for (; *s; s++) {
-                        if (*s == '=') eq = 1;
-                        if (eq) *s = *(s + 1);
-                    }
-                    OUString repHyphlow(rep[nHyphenationPos], strlen(rep[nHyphenationPos]), aEnc);
-                    OUString repHyph;
-                    switch (ct) {
-                       case CAPTYPE_ALLCAP:
-                     {
-                               repHyph = makeUpperCase(repHyphlow, pCC);
-                               break;
-                             }
-                       case CAPTYPE_INITCAP:
-                     {
-                               if (nHyphenationPosAlt == 0) {
-                                    repHyph = makeInitCap(repHyphlow, pCC);
-                               } else {
-                                    repHyph = repHyphlow;
-                               }
-                               break;
-                             }
-                           default:
-                     {
-                               repHyph = repHyphlow;
-                               break;
-                             }
             }
+        }
+
+        if (nHyphenationPos  == -1)
+        {
+            xRes = NULL;
+        }
+        else
+        {
+            if (rep && rep[nHyphenationPos])
+            {
+                // remove equal sign
+                char * s = rep[nHyphenationPos];
+                int eq = 0;
+                for (; *s; s++)
+                {
+                    if (*s == '=') eq = 1;
+                    if (eq) *s = *(s + 1);
+                }
+                OUString repHyphlow(rep[nHyphenationPos], strlen(rep[nHyphenationPos]), eEnc);
+                OUString repHyph;
+                switch (ct)
+                {
+                    case CAPTYPE_ALLCAP:
+                    {
+                        repHyph = makeUpperCase(repHyphlow, pCC);
+                        break;
+                    }
+                    case CAPTYPE_INITCAP:
+                    {
+                        if (nHyphenationPosAlt == 0)
+                            repHyph = makeInitCap(repHyphlow, pCC);
+                        else
+                             repHyph = repHyphlow;
+                        break;
+                    }
+                    default:
+                    {
+                        repHyph = repHyphlow;
+                        break;
+                    }
+                }
 
-                    // handle shortening
-                    INT16 nPos = (INT16) ((nHyphenationPosAltHyph < nHyphenationPos) ?
-                        nHyphenationPosAltHyph : nHyphenationPos);
-                    // dicretionary hyphenation
+                // handle shortening
+                INT16 nPos = (INT16) ((nHyphenationPosAltHyph < nHyphenationPos) ?
+                nHyphenationPosAltHyph : nHyphenationPos);
+                // dicretionary hyphenation
                 xRes = new HyphenatedWord( aWord, LocaleToLanguage( aLocale ), nPos,
-                aWord.replaceAt(nHyphenationPosAlt + 1, cut[nHyphenationPos], repHyph),
-                        (INT16) nHyphenationPosAltHyph);
-                } else {
+                    aWord.replaceAt(nHyphenationPosAlt + 1, cut[nHyphenationPos], repHyph),
+                    (INT16) nHyphenationPosAltHyph);
+            }
+            else
+            {
                 xRes = new HyphenatedWord( aWord, LocaleToLanguage( aLocale ),
-                        (INT16)nHyphenationPos, aWord, (INT16) nHyphenationPos);
-                }
+                    (INT16)nHyphenationPos, aWord, (INT16) nHyphenationPos);
+            }
         }
 
-            delete[] lcword;
+        delete[] lcword;
         delete[] hyphens;
-            if (rep) {
-                for(int j = 0; j < n; j++) {
-                    if (rep[j]) free(rep[j]);
-                }
-                free(rep);
+        if (rep)
+        {
+            for(int j = 0; j < n; j++)
+            {
+                if (rep[j]) free(rep[j]);
             }
-            if (pos) free(pos);
-            if (cut) free(cut);
+            free(rep);
+        }
+        if (pos) free(pos);
+        if (cut) free(cut);
         return xRes;
     }
-        return NULL;
+    return NULL;
 }
 
 
-Reference < XHyphenatedWord > SAL_CALL
-    Hyphenator::queryAlternativeSpelling( const ::rtl::OUString& /*aWord*/,
-                  const ::com::sun::star::lang::Locale& /*aLocale*/,
-                  sal_Int16 /*nIndex*/,
-                  const ::com::sun::star::beans::PropertyValues& /*aProperties*/ )
-        throw(::com::sun::star::lang::IllegalArgumentException,
-              ::com::sun::star::uno::RuntimeException)
+Reference < XHyphenatedWord > SAL_CALL Hyphenator::queryAlternativeSpelling(
+        const ::rtl::OUString& /*aWord*/,
+        const ::com::sun::star::lang::Locale& /*aLocale*/,
+        sal_Int16 /*nIndex*/,
+        const ::com::sun::star::beans::PropertyValues& /*aProperties*/ )
+        throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
 {
   /* alternative spelling isn't supported by tex dictionaries */
   /* XXX: OOo's extended libhjn algorithm can support alternative spellings with extended TeX dic. */
@@ -529,251 +548,262 @@ Reference < XHyphenatedWord > SAL_CALL
   return NULL;
 }
 
-Reference< XPossibleHyphens > SAL_CALL
-    Hyphenator::createPossibleHyphens( const ::rtl::OUString& aWord,
-                   const ::com::sun::star::lang::Locale& aLocale,
-                   const ::com::sun::star::beans::PropertyValues& aProperties )
-        throw(::com::sun::star::lang::IllegalArgumentException,
-              ::com::sun::star::uno::RuntimeException)
-
+Reference< XPossibleHyphens > SAL_CALL Hyphenator::createPossibleHyphens( const ::rtl::OUString& aWord,
+        const ::com::sun::star::lang::Locale& aLocale,
+        const ::com::sun::star::beans::PropertyValues& aProperties )
+        throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
 {
-  int wordlen;
-  char *hyphens;
-  char *lcword;
-  int k;
+    int wordlen;
+    char *hyphens;
+    char *lcword;
+    int k;
 
-  PropertyHelper_Hyphen & rHelper = GetPropHelper();
-  rHelper.SetTmpPropVals(aProperties);
-  sal_Int16 minTrail = rHelper.GetMinTrailing();
-  sal_Int16 minLead = rHelper.GetMinLeading();
+    PropertyHelper_Hyphen & rHelper = GetPropHelper();
+    rHelper.SetTmpPropVals(aProperties);
+    sal_Int16 minTrail = rHelper.GetMinTrailing();
+    sal_Int16 minLead = rHelper.GetMinLeading();
 
-  HyphenDict *dict = NULL;
-  rtl_TextEncoding aEnc = 0;
-  CharClass* pCC = NULL;
+    HyphenDict *dict = NULL;
+    rtl_TextEncoding eEnc = RTL_TEXTENCODING_DONTKNOW;
+    CharClass* pCC = NULL;
 
-  Reference< XPossibleHyphens > xRes;
+    Reference< XPossibleHyphens > xRes;
 
-  k = -1;
-  for (int j = 0; j < numdict; j++)
-     if (aLocale == aDicts[j].aLoc) k = j;
+    k = -1;
+    for (int j = 0; j < numdict; j++)
+    {
+        if (aLocale == aDicts[j].aLoc) k = j;
+    }
 
+    // if we have a hyphenation dictionary matching this locale
+    if (k != -1)
+    {
+        // if this dictioanry has not been loaded yet do that
+        if (!aDicts[k].aPtr)
+        {
+            OUString DictFN = aDicts[k].aName + A2OU(".dic");
+            OUString dictpath;
 
-  // if we have a hyphenation dictionary matching this locale
-  if (k != -1) {
+            osl::FileBase::getSystemPathFromFileURL( DictFN, dictpath );
+            OString sTmp( OU2ENC( dictpath, osl_getThreadTextEncoding() ) );
 
-      // if this dictioanry has not been loaded yet do that
-      if (!aDicts[k].aPtr) {
+#if defined(WNT)
+            // workaround for Windows specifc problem that the
+            // path length in calls to 'fopen' is limted to somewhat
+            // about 120+ characters which will usually be exceed when
+            // using dictionaries as extensions.
+            sTmp = Win_GetShortPathName( dictpath );
+#endif
 
-         OUString DictFN = aDicts[k].aName + A2OU(".dic");
-         OUString dictpath;
+            if ( ( dict = hnj_hyphen_load ( sTmp.getStr()) ) == NULL )
+            {
+               fprintf(stderr, "Couldn't find file %s and %s\n", sTmp.getStr(), OU2ENC(dictpath, osl_getThreadTextEncoding()) );
+               return NULL;
+            }
+            aDicts[k].aPtr = dict;
+            aDicts[k].eEnc = getTextEncodingFromCharset(dict->cset);
+        }
 
-         osl::FileBase::getSystemPathFromFileURL( DictFN, dictpath );
-         OString sTmp( OU2ENC( dictpath, osl_getThreadTextEncoding() ) );
+        // other wise hyphenate the word with that dictionary
+        dict = aDicts[k].aPtr;
+        eEnc = aDicts[k].eEnc;
+        pCC  = aDicts[k].apCC;
 
-#if defined(WNT)
-        // workaround for Windows specifc problem that the
-        // path length in calls to 'fopen' is limted to somewhat
-        // about 120+ characters which will usually be exceed when
-        // using dictionaries as extensions.
-        sTmp = Win_GetShortPathName( dictpath );
-#endif
+        // we don't want to work with a default text encoding since following incorrect
+        // results may occur only for specific text and thus may be hard to notice.
+        // Thus better always make a clean exit here if the text encoding is in question.
+        // Hopefully something not working at all will raise proper attention quickly. ;-)
+        DBG_ASSERT( eEnc != RTL_TEXTENCODING_DONTKNOW, "failed to get text encoding! (maybe incorrect encoding string in file)" );
+        if (eEnc == RTL_TEXTENCODING_DONTKNOW)
+            return NULL;
 
-        if ( ( dict = hnj_hyphen_load ( sTmp.getStr()) ) == NULL )
+        // first handle smart quotes both single and double
+        OUStringBuffer rBuf(aWord);
+        sal_Int32 nc = rBuf.getLength();
+        sal_Unicode ch;
+        for (sal_Int32 ix=0; ix < nc; ix++)
         {
-           fprintf(stderr, "Couldn't find file %s and %s\n", sTmp.getStr(), OU2ENC(dictpath, osl_getThreadTextEncoding()) );
-           return NULL;
+            ch = rBuf.charAt(ix);
+            if ((ch == 0x201C) || (ch == 0x201D))
+                rBuf.setCharAt(ix,(sal_Unicode)0x0022);
+            if ((ch == 0x2018) || (ch == 0x2019))
+                rBuf.setCharAt(ix,(sal_Unicode)0x0027);
         }
-        aDicts[k].aPtr = dict;
-         aDicts[k].aEnc = rtl_getTextEncodingFromUnixCharset(dict->cset);
-         if (aDicts[k].aEnc == RTL_TEXTENCODING_DONTKNOW) {
-            if (strcmp("ISCII-DEVANAGARI", dict->cset) == 0) {
-               aDicts[k].aEnc = RTL_TEXTENCODING_ISCII_DEVANAGARI;
-            } else if (strcmp("UTF-8", dict->cset) == 0) {
-               aDicts[k].aEnc = RTL_TEXTENCODING_UTF8;
+        OUString nWord(rBuf.makeStringAndClear());
+
+        // now convert word to all lowercase for pattern recognition
+        OUString nTerm(makeLowerCase(nWord, pCC));
+
+        // now convert word to needed encoding
+        OString encWord(OU2ENC(nTerm,eEnc));
+
+        wordlen = encWord.getLength();
+        lcword = new char[wordlen+1];
+        hyphens = new char[wordlen+5];
+        char ** rep = NULL; // replacements of discretionary hyphenation
+        int * pos = NULL; // array of [hyphenation point] minus [deletion position]
+        int * cut = NULL; // length of deletions in original word
+
+        // copy converted word into simple char buffer
+        strcpy(lcword,encWord.getStr());
+
+        // first remove any trailing periods
+        int n = wordlen-1;
+        while((n >=0) && (lcword[n] == '.'))
+            n--;
+        n++;
+        // fprintf(stderr,"hyphenate... %s\n",lcword); fflush(stderr);
+        if (n > 0)
+        {
+            const bool bFailed = 0 != hnj_hyphen_hyphenate3(dict, lcword, n, hyphens, NULL,
+                    &rep, &pos, &cut, minLead, minTrail,
+                    Max(dict->clhmin, Max(dict->clhmin, 2) + Max(0, minLead - Max(dict->lhmin, 2))),
+                    Max(dict->crhmin, Max(dict->crhmin, 2) + Max(0, minTrail - Max(dict->rhmin, 2))) );
+            if (bFailed)
+            {
+                delete[] hyphens;
+                delete[] lcword;
+
+                if (rep)
+                {
+                    for(int j = 0; j < n; j++)
+                    {
+                        if (rep[j]) free(rep[j]);
+                    }
+                    free(rep);
+                }
+                if (pos) free(pos);
+                if (cut) free(cut);
+
+                return NULL;
             }
-         }
-      }
-
-      // other wise hyphenate the word with that dictionary
-      dict = aDicts[k].aPtr;
-      aEnc = aDicts[k].aEnc;
-      pCC  = aDicts[k].apCC;
-
-      // first handle smart quotes both single and double
-      OUStringBuffer rBuf(aWord);
-      sal_Int32 nc = rBuf.getLength();
-      sal_Unicode ch;
-      for (sal_Int32 ix=0; ix < nc; ix++) {
-      ch = rBuf.charAt(ix);
-          if ((ch == 0x201C) || (ch == 0x201D)) rBuf.setCharAt(ix,(sal_Unicode)0x0022);
-          if ((ch == 0x2018) || (ch == 0x2019)) rBuf.setCharAt(ix,(sal_Unicode)0x0027);
-      }
-      OUString nWord(rBuf.makeStringAndClear());
-
-      // now convert word to all lowercase for pattern recognition
-      OUString nTerm(makeLowerCase(nWord, pCC));
-
-      // now convert word to needed encoding
-      OString encWord(OU2ENC(nTerm,aEnc));
-
-      wordlen = encWord.getLength();
-      lcword = new char[wordlen+1];
-      hyphens = new char[wordlen+5];
-      char ** rep = NULL; // replacements of discretionary hyphenation
-      int * pos = NULL; // array of [hyphenation point] minus [deletion position]
-      int * cut = NULL; // length of deletions in original word
-
-      // copy converted word into simple char buffer
-      strcpy(lcword,encWord.getStr());
-
-      // first remove any trailing periods
-      int n = wordlen-1;
-      while((n >=0) && (lcword[n] == '.')) n--;
-      n++;
-      // fprintf(stderr,"hyphenate... %s\n",lcword); fflush(stderr);
-      if (n > 0) {
-         if (hnj_hyphen_hyphenate3(dict, lcword, n, hyphens, NULL, &rep, &pos, &cut,
-            minLead, minTrail, Max(dict->clhmin, Max(dict->clhmin, 2) + Max(0, minLead - Max(dict->lhmin, 2))),
-            Max(dict->crhmin, Max(dict->crhmin, 2) + Max(0, minTrail - Max(dict->rhmin, 2)))))
-         {
-             delete[] hyphens;
-             delete[] lcword;
-
-             if (rep) {
-                 for(int j = 0; j < n; j++) {
-                     if (rep[j]) free(rep[j]);
-                 }
-                 free(rep);
-             }
-             if (pos) free(pos);
-             if (cut) free(cut);
-
-             return NULL;
-         }
-      }
-      // now backfill hyphens[] for any removed periods
-      for (int c = n; c < wordlen; c++) hyphens[c] = '0';
-      hyphens[wordlen] = '\0';
-      // fprintf(stderr,"... %s\n",hyphens); fflush(stderr);
-
-      INT16 nHyphCount = 0;
-      INT16 i;
-
-      for ( i = 0; i < encWord.getLength(); i++)
-        if (hyphens[i]&1 && (!rep || !rep[i]))
-          nHyphCount++;
-
-      Sequence< INT16 > aHyphPos(nHyphCount);
-      INT16 *pPos = aHyphPos.getArray();
-      OUStringBuffer hyphenatedWordBuffer;
-      OUString hyphenatedWord;
-      nHyphCount = 0;
-
-      for (i = 0; i < nWord.getLength(); i++) {
-          hyphenatedWordBuffer.append(aWord[i]);
-          // hyphenation position (not alternative)
-          if (hyphens[i]&1 && (!rep || !rep[i])) {
-              pPos[nHyphCount] = i;
-              hyphenatedWordBuffer.append(sal_Unicode('='));
-              nHyphCount++;
-          }
-      }
-
-      hyphenatedWord = hyphenatedWordBuffer.makeStringAndClear();
-      //fprintf(stderr,"result is %s\n",OU2A(hyphenatedWord));
-      //fflush(stderr);
-
-      xRes = new PossibleHyphens( aWord, LocaleToLanguage( aLocale ),
-                hyphenatedWord, aHyphPos );
-
-      delete[] hyphens;
-      delete[] lcword;
-
-      if (rep) {
-          for(int j = 0; j < n; j++) {
-              if (rep[j]) free(rep[j]);
-          }
-          free(rep);
-      }
-      if (pos) free(pos);
-      if (cut) free(cut);
-
-      return xRes;
-  }
+        }
+        // now backfill hyphens[] for any removed periods
+        for (int c = n; c < wordlen; c++)
+            hyphens[c] = '0';
+        hyphens[wordlen] = '\0';
+        // fprintf(stderr,"... %s\n",hyphens); fflush(stderr);
 
-  return NULL;
+        INT16 nHyphCount = 0;
+        INT16 i;
 
+        for ( i = 0; i < encWord.getLength(); i++)
+        {
+            if (hyphens[i]&1 && (!rep || !rep[i]))
+                nHyphCount++;
+        }
+
+        Sequence< INT16 > aHyphPos(nHyphCount);
+        INT16 *pPos = aHyphPos.getArray();
+        OUStringBuffer hyphenatedWordBuffer;
+        OUString hyphenatedWord;
+        nHyphCount = 0;
+
+        for (i = 0; i < nWord.getLength(); i++)
+        {
+            hyphenatedWordBuffer.append(aWord[i]);
+            // hyphenation position (not alternative)
+            if (hyphens[i]&1 && (!rep || !rep[i]))
+            {
+                pPos[nHyphCount] = i;
+                hyphenatedWordBuffer.append(sal_Unicode('='));
+                nHyphCount++;
+            }
+        }
+
+        hyphenatedWord = hyphenatedWordBuffer.makeStringAndClear();
+        //fprintf(stderr,"result is %s\n",OU2A(hyphenatedWord));
+        //fflush(stderr);
+
+        xRes = new PossibleHyphens( aWord, LocaleToLanguage( aLocale ),
+                  hyphenatedWord, aHyphPos );
+
+        delete[] hyphens;
+        delete[] lcword;
+
+        if (rep)
+        {
+            for(int j = 0; j < n; j++)
+            {
+                if (rep[j]) free(rep[j]);
+            }
+            free(rep);
+        }
+        if (pos) free(pos);
+        if (cut) free(cut);
+
+        return xRes;
+    }
+
+    return NULL;
 }
 
 sal_uInt16 SAL_CALL Hyphenator::capitalType(const OUString& aTerm, CharClass * pCC)
 {
-        sal_Int32 tlen = aTerm.getLength();
-        if ((pCC) && (tlen)) {
-              String aStr(aTerm);
-              sal_Int32 nc = 0;
-              for (xub_StrLen tindex = 0; tindex < tlen;  tindex++) {
-               if (pCC->getCharacterType(aStr,tindex) &
-                       ::com::sun::star::i18n::KCharacterType::UPPER) nc++;
-          }
-
-              if (nc == 0) return (sal_uInt16) CAPTYPE_NOCAP;
-
-              if (nc == tlen) return (sal_uInt16) CAPTYPE_ALLCAP;
+    sal_Int32 tlen = aTerm.getLength();
+    if ((pCC) && (tlen))
+    {
+        String aStr(aTerm);
+        sal_Int32 nc = 0;
+        for (xub_StrLen tindex = 0; tindex < tlen;  tindex++)
+        {
+            if (pCC->getCharacterType(aStr,tindex) & ::com::sun::star::i18n::KCharacterType::UPPER)
+                nc++;
+        }
 
-              if ((nc == 1) && (pCC->getCharacterType(aStr,0) &
-                      ::com::sun::star::i18n::KCharacterType::UPPER))
-                   return (sal_uInt16) CAPTYPE_INITCAP;
+        if (nc == 0)
+            return (sal_uInt16) CAPTYPE_NOCAP;
+        if (nc == tlen)
+            return (sal_uInt16) CAPTYPE_ALLCAP;
+        if ((nc == 1) && (pCC->getCharacterType(aStr,0) & ::com::sun::star::i18n::KCharacterType::UPPER))
+            return (sal_uInt16) CAPTYPE_INITCAP;
 
-              return (sal_uInt16) CAPTYPE_MIXED;
+        return (sal_uInt16) CAPTYPE_MIXED;
     }
-        return (sal_uInt16) CAPTYPE_UNKNOWN;
+    return (sal_uInt16) CAPTYPE_UNKNOWN;
 }
 
 OUString SAL_CALL Hyphenator::makeLowerCase(const OUString& aTerm, CharClass * pCC)
 {
-        if (pCC)
-      return pCC->toLower_rtl(aTerm, 0, aTerm.getLength());
-        return aTerm;
+    if (pCC)
+        return pCC->toLower_rtl(aTerm, 0, aTerm.getLength());
+    return aTerm;
 }
 
 OUString SAL_CALL Hyphenator::makeUpperCase(const OUString& aTerm, CharClass * pCC)
 {
-        if (pCC)
-              return pCC->toUpper_rtl(aTerm, 0, aTerm.getLength());
-        return aTerm;
+    if (pCC)
+        return pCC->toUpper_rtl(aTerm, 0, aTerm.getLength());
+    return aTerm;
 }
 
 
 OUString SAL_CALL Hyphenator::makeInitCap(const OUString& aTerm, CharClass * pCC)
 {
-        sal_Int32 tlen = aTerm.getLength();
-        if ((pCC) && (tlen)) {
-              OUString bTemp = aTerm.copy(0,1);
-              if (tlen > 1)
-                   return ( pCC->toUpper_rtl(bTemp, 0, 1)
-                             + pCC->toLower_rtl(aTerm,1,(tlen-1)) );
-
-          return pCC->toUpper_rtl(bTemp, 0, 1);
+    sal_Int32 tlen = aTerm.getLength();
+    if ((pCC) && (tlen))
+    {
+        OUString bTemp = aTerm.copy(0,1);
+        if (tlen > 1)
+            return ( pCC->toUpper_rtl(bTemp, 0, 1) + pCC->toLower_rtl(aTerm,1,(tlen-1)) );
+
+        return pCC->toUpper_rtl(bTemp, 0, 1);
     }
-        return aTerm;
+    return aTerm;
 }
 
 
-
-
 Reference< XInterface > SAL_CALL Hyphenator_CreateInstance(
-            const Reference< XMultiServiceFactory > & /*rSMgr*/ )
+        const Reference< XMultiServiceFactory > & /*rSMgr*/ )
         throw(Exception)
 {
-
     Reference< XInterface > xService = (cppu::OWeakObject*) new Hyphenator;
     return xService;
 }
 
 
-sal_Bool SAL_CALL
-    Hyphenator::addLinguServiceEventListener(
-            const Reference< XLinguServiceEventListener >& rxLstnr )
+sal_Bool SAL_CALL Hyphenator::addLinguServiceEventListener(
+        const Reference< XLinguServiceEventListener >& rxLstnr )
         throw(RuntimeException)
 {
     MutexGuard  aGuard( GetLinguMutex() );
@@ -787,9 +817,8 @@ sal_Bool SAL_CALL
 }
 
 
-sal_Bool SAL_CALL
-    Hyphenator::removeLinguServiceEventListener(
-            const Reference< XLinguServiceEventListener >& rxLstnr )
+sal_Bool SAL_CALL Hyphenator::removeLinguServiceEventListener(
+        const Reference< XLinguServiceEventListener >& rxLstnr )
         throw(RuntimeException)
 {
     MutexGuard  aGuard( GetLinguMutex() );
@@ -804,8 +833,7 @@ sal_Bool SAL_CALL
 }
 
 
-OUString SAL_CALL
-    Hyphenator::getServiceDisplayName( const Locale& /*rLocale*/ )
+OUString SAL_CALL Hyphenator::getServiceDisplayName( const Locale& /*rLocale*/ )
         throw(RuntimeException)
 {
     MutexGuard  aGuard( GetLinguMutex() );
@@ -813,8 +841,7 @@ OUString SAL_CALL
 }
 
 
-void SAL_CALL
-    Hyphenator::initialize( const Sequence< Any >& rArguments )
+void SAL_CALL Hyphenator::initialize( const Sequence< Any >& rArguments )
         throw(Exception, RuntimeException)
 {
     MutexGuard  aGuard( GetLinguMutex() );
@@ -836,16 +863,15 @@ void SAL_CALL
             xPropHelper = pPropHelper;
             pPropHelper->AddAsPropListener();   //! after a reference is established
         }
-        else {
+        else
+        {
             DBG_ERROR( "wrong number of arguments in sequence" );
         }
-
     }
 }
 
 
-void SAL_CALL
-    Hyphenator::dispose()
+void SAL_CALL Hyphenator::dispose()
         throw(RuntimeException)
 {
     MutexGuard  aGuard( GetLinguMutex() );
@@ -859,8 +885,7 @@ void SAL_CALL
 }
 
 
-void SAL_CALL
-    Hyphenator::addEventListener( const Reference< XEventListener >& rxListener )
+void SAL_CALL Hyphenator::addEventListener( const Reference< XEventListener >& rxListener )
         throw(RuntimeException)
 {
     MutexGuard  aGuard( GetLinguMutex() );
@@ -870,8 +895,7 @@ void SAL_CALL
 }
 
 
-void SAL_CALL
-    Hyphenator::removeEventListener( const Reference< XEventListener >& rxListener )
+void SAL_CALL Hyphenator::removeEventListener( const Reference< XEventListener >& rxListener )
         throw(RuntimeException)
 {
     MutexGuard  aGuard( GetLinguMutex() );
@@ -931,7 +955,6 @@ Sequence< OUString > Hyphenator::getSupportedServiceNames_Static()
 sal_Bool SAL_CALL Hyphenator_writeInfo(
             void * /*pServiceManager*/, registry::XRegistryKey * pRegistryKey )
 {
-
     try
     {
         String aImpl( '/' );
diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx
old mode 100644
new mode 100755
index 031217914754..e20b4f58f589
--- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx
+++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx
@@ -65,7 +65,7 @@ struct HDInfo {
   HyphenDict *     aPtr;
   OUString         aName;
   Locale           aLoc;
-  rtl_TextEncoding aEnc;
+  rtl_TextEncoding eEnc;
   CharClass *      apCC;
 };
 
@@ -83,12 +83,12 @@ class Hyphenator :
     >
 {
     Sequence< Locale >                      aSuppLocales;
-        HDInfo * aDicts;
-        sal_Int32 numdict;
+    HDInfo * aDicts;
+    sal_Int32 numdict;
 
     ::cppu::OInterfaceContainerHelper       aEvtListeners;
     Reference< XPropertyChangeListener >    xPropHelper;
-    Reference< XMultiServiceFactory > rSMgr;
+    Reference< XMultiServiceFactory >       rSMgr;
     linguistic::PropertyHelper_Hyphen *     pPropHelper;
     BOOL                                    bDisposing;
 
@@ -108,88 +108,38 @@ public:
     virtual ~Hyphenator();
 
     // XSupportedLocales (for XHyphenator)
-    virtual Sequence< Locale > SAL_CALL getLocales()
-        throw(RuntimeException);
-    virtual sal_Bool SAL_CALL hasLocale( const Locale& rLocale )
-        throw(RuntimeException);
+    virtual Sequence< Locale > SAL_CALL getLocales() throw(RuntimeException);
+    virtual sal_Bool SAL_CALL hasLocale( const Locale& rLocale ) throw(RuntimeException);
 
     // XHyphenator
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenatedWord > SAL_CALL
-    hyphenate( const ::rtl::OUString& aWord,
-           const ::com::sun::star::lang::Locale& aLocale,
-           sal_Int16 nMaxLeading,
-           const ::com::sun::star::beans::PropertyValues& aProperties )
-        throw(::com::sun::star::lang::IllegalArgumentException,
-              ::com::sun::star::uno::RuntimeException);
-
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenatedWord > SAL_CALL
-    queryAlternativeSpelling( const ::rtl::OUString& aWord,
-                  const ::com::sun::star::lang::Locale& aLocale,
-                  sal_Int16 nIndex,
-                  const ::com::sun::star::beans::PropertyValues& aProperties )
-        throw(::com::sun::star::lang::IllegalArgumentException,
-              ::com::sun::star::uno::RuntimeException);
-
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XPossibleHyphens > SAL_CALL
-    createPossibleHyphens( const ::rtl::OUString& aWord,
-                   const ::com::sun::star::lang::Locale& aLocale,
-                   const ::com::sun::star::beans::PropertyValues& aProperties )
-        throw(::com::sun::star::lang::IllegalArgumentException,
-              ::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenatedWord > SAL_CALL hyphenate( const ::rtl::OUString& aWord, const ::com::sun::star::lang::Locale& aLocale, sal_Int16 nMaxLeading, const ::com::sun::star::beans::PropertyValues& aProperties ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenatedWord > SAL_CALL queryAlternativeSpelling( const ::rtl::OUString& aWord, const ::com::sun::star::lang::Locale& aLocale, sal_Int16 nIndex, const ::com::sun::star::beans::PropertyValues& aProperties ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XPossibleHyphens > SAL_CALL createPossibleHyphens( const ::rtl::OUString& aWord, const ::com::sun::star::lang::Locale& aLocale, const ::com::sun::star::beans::PropertyValues& aProperties ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
 
     // XLinguServiceEventBroadcaster
-    virtual sal_Bool SAL_CALL
-        addLinguServiceEventListener(
-            const Reference< XLinguServiceEventListener >& rxLstnr )
-            throw(RuntimeException);
-    virtual sal_Bool SAL_CALL
-        removeLinguServiceEventListener(
-            const Reference< XLinguServiceEventListener >& rxLstnr )
-            throw(RuntimeException);
+    virtual sal_Bool SAL_CALL addLinguServiceEventListener( const Reference< XLinguServiceEventListener >& rxLstnr ) throw(RuntimeException);
+    virtual sal_Bool SAL_CALL removeLinguServiceEventListener( const Reference< XLinguServiceEventListener >& rxLstnr ) throw(RuntimeException);
 
     // XServiceDisplayName
-    virtual OUString SAL_CALL
-        getServiceDisplayName( const Locale& rLocale )
-            throw(RuntimeException);
+    virtual OUString SAL_CALL getServiceDisplayName( const Locale& rLocale ) throw(RuntimeException);
 
     // XInitialization
-    virtual void SAL_CALL
-        initialize( const Sequence< Any >& rArguments )
-            throw(Exception, RuntimeException);
+    virtual void SAL_CALL initialize( const Sequence< Any >& rArguments ) throw(Exception, RuntimeException);
 
     // XComponent
-    virtual void SAL_CALL
-        dispose()
-            throw(RuntimeException);
-    virtual void SAL_CALL
-        addEventListener( const Reference< XEventListener >& rxListener )
-            throw(RuntimeException);
-    virtual void SAL_CALL
-        removeEventListener( const Reference< XEventListener >& rxListener )
-            throw(RuntimeException);
-
-    ////////////////////////////////////////////////////////////
-    // Service specific part
-    //
+    virtual void SAL_CALL dispose() throw(RuntimeException);
+    virtual void SAL_CALL addEventListener( const Reference< XEventListener >& rxListener ) throw(RuntimeException);
+    virtual void SAL_CALL removeEventListener( const Reference< XEventListener >& rxListener ) throw(RuntimeException);
 
     // XServiceInfo
-    virtual OUString SAL_CALL
-        getImplementationName()
-            throw(RuntimeException);
-    virtual sal_Bool SAL_CALL
-        supportsService( const OUString& rServiceName )
-            throw(RuntimeException);
-    virtual Sequence< OUString > SAL_CALL
-        getSupportedServiceNames()
-            throw(RuntimeException);
-
-
-    static inline OUString
-        getImplementationName_Static() throw();
-    static Sequence< OUString >
-        getSupportedServiceNames_Static() throw();
+    virtual OUString SAL_CALL getImplementationName() throw(RuntimeException);
+    virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw(RuntimeException);
+    virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(RuntimeException);
 
 
+    static inline OUString  getImplementationName_Static() throw();
+    static Sequence< OUString > getSupportedServiceNames_Static() throw();
+
 
 private:
         sal_uInt16 SAL_CALL capitalType(const OUString&, CharClass *);
diff --git a/lingucomponent/source/lingutil/lingutil.cxx b/lingucomponent/source/lingutil/lingutil.cxx
old mode 100644
new mode 100755
index ee7d71de4435..14253fca5cd3
--- a/lingucomponent/source/lingutil/lingutil.cxx
+++ b/lingucomponent/source/lingutil/lingutil.cxx
@@ -50,6 +50,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -268,5 +269,25 @@ void MergeNewStyleDicsAndOldStyleDics(
     }
 }
 
+
+rtl_TextEncoding getTextEncodingFromCharset(const sal_Char* pCharset)
+{
+    // default result: used to indicate that we failed to get the proper encoding
+    rtl_TextEncoding eRet = RTL_TEXTENCODING_DONTKNOW;
+
+    if (pCharset)
+    {
+        eRet = rtl_getTextEncodingFromMimeCharset(pCharset);
+        if (eRet == RTL_TEXTENCODING_DONTKNOW)
+            eRet = rtl_getTextEncodingFromUnixCharset(pCharset);
+        if (eRet == RTL_TEXTENCODING_DONTKNOW)
+        {
+            if (strcmp("ISCII-DEVANAGARI", pCharset) == 0)
+                eRet = RTL_TEXTENCODING_ISCII_DEVANAGARI;
+        }
+    }
+    return eRet;
+}
+
 //////////////////////////////////////////////////////////////////////
 
diff --git a/lingucomponent/source/lingutil/lingutil.hxx b/lingucomponent/source/lingutil/lingutil.hxx
index 8b45b1f509ad..82d2e646edfc 100644
--- a/lingucomponent/source/lingutil/lingutil.hxx
+++ b/lingucomponent/source/lingutil/lingutil.hxx
@@ -101,5 +101,13 @@ void MergeNewStyleDicsAndOldStyleDics( std::list< SvtLinguConfigDictionaryEntry
 
 ///////////////////////////////////////////////////////////////////////////
 
+
+//Find an encoding from a charset string, using
+//rtl_getTextEncodingFromMimeCharset and falling back to
+//rtl_getTextEncodingFromUnixCharset with the addition of
+//ISCII-DEVANAGARI. On failure will return final fallback of
+//RTL_TEXTENCODING_ISO_8859_1
+rtl_TextEncoding getTextEncodingFromCharset(const sal_Char* pCharset);
+
 #endif
 
diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx b/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx
old mode 100644
new mode 100755
index b3cfce92fd8b..fc1906e18025
--- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx
+++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx
@@ -75,14 +75,14 @@ class MacSpellChecker :
         XServiceDisplayName
     >
 {
-    Sequence< Locale >                 aSuppLocales;
+    Sequence< Locale >      aSuppLocales;
 //        Hunspell **                         aDicts;
-        rtl_TextEncoding *                 aDEncs;
-        Locale *                           aDLocs;
-        OUString *                         aDNames;
-        sal_Int32                          numdict;
-        NSSpellChecker *                    macSpell;
-        int                                 macTag;   //unique tag for this doc
+    rtl_TextEncoding *      aDEncs;
+    Locale *                aDLocs;
+    OUString *              aDNames;
+    sal_Int32               numdict;
+    NSSpellChecker *        macSpell;
+    int                     macTag;   //unique tag for this doc
 
     ::cppu::OInterfaceContainerHelper       aEvtListeners;
     Reference< XPropertyChangeListener >    xPropHelper;
@@ -100,84 +100,43 @@ class MacSpellChecker :
     }
 
     INT16   GetSpellFailure( const OUString &rWord, const Locale &rLocale );
-    Reference< XSpellAlternatives >
-            GetProposals( const OUString &rWord, const Locale &rLocale );
+    Reference< XSpellAlternatives > GetProposals( const OUString &rWord, const Locale &rLocale );
 
 public:
     MacSpellChecker();
     virtual ~MacSpellChecker();
 
     // XSupportedLocales (for XSpellChecker)
-    virtual Sequence< Locale > SAL_CALL
-        getLocales()
-            throw(RuntimeException);
-    virtual sal_Bool SAL_CALL
-        hasLocale( const Locale& rLocale )
-            throw(RuntimeException);
+    virtual Sequence< Locale > SAL_CALL getLocales() throw(RuntimeException);
+    virtual sal_Bool SAL_CALL hasLocale( const Locale& rLocale ) throw(RuntimeException);
 
     // XSpellChecker
-    virtual sal_Bool SAL_CALL
-        isValid( const OUString& rWord, const Locale& rLocale,
-                const PropertyValues& rProperties )
-            throw(IllegalArgumentException,
-                  RuntimeException);
-    virtual Reference< XSpellAlternatives > SAL_CALL
-        spell( const OUString& rWord, const Locale& rLocale,
-                const PropertyValues& rProperties )
-            throw(IllegalArgumentException,
-                  RuntimeException);
+    virtual sal_Bool SAL_CALL isValid( const OUString& rWord, const Locale& rLocale, const PropertyValues& rProperties ) throw(IllegalArgumentException, RuntimeException);
+    virtual Reference< XSpellAlternatives > SAL_CALL spell( const OUString& rWord, const Locale& rLocale, const PropertyValues& rProperties ) throw(IllegalArgumentException, RuntimeException);
 
     // XLinguServiceEventBroadcaster
-    virtual sal_Bool SAL_CALL
-        addLinguServiceEventListener(
-            const Reference< XLinguServiceEventListener >& rxLstnr )
-            throw(RuntimeException);
-    virtual sal_Bool SAL_CALL
-        removeLinguServiceEventListener(
-            const Reference< XLinguServiceEventListener >& rxLstnr )
-            throw(RuntimeException);
+    virtual sal_Bool SAL_CALL addLinguServiceEventListener( const Reference< XLinguServiceEventListener >& rxLstnr ) throw(RuntimeException);
+    virtual sal_Bool SAL_CALL removeLinguServiceEventListener( const Reference< XLinguServiceEventListener >& rxLstnr ) throw(RuntimeException);
 
     // XServiceDisplayName
-    virtual OUString SAL_CALL
-        getServiceDisplayName( const Locale& rLocale )
-            throw(RuntimeException);
+    virtual OUString SAL_CALL getServiceDisplayName( const Locale& rLocale ) throw(RuntimeException);
 
     // XInitialization
-    virtual void SAL_CALL
-        initialize( const Sequence< Any >& rArguments )
-            throw(Exception, RuntimeException);
+    virtual void SAL_CALL initialize( const Sequence< Any >& rArguments ) throw(Exception, RuntimeException);
 
     // XComponent
-    virtual void SAL_CALL
-        dispose()
-            throw(RuntimeException);
-    virtual void SAL_CALL
-        addEventListener( const Reference< XEventListener >& rxListener )
-            throw(RuntimeException);
-    virtual void SAL_CALL
-        removeEventListener( const Reference< XEventListener >& rxListener )
-            throw(RuntimeException);
-
-    ////////////////////////////////////////////////////////////
-    // Service specific part
-    //
+    virtual void SAL_CALL dispose() throw(RuntimeException);
+    virtual void SAL_CALL addEventListener( const Reference< XEventListener >& rxListener ) throw(RuntimeException);
+    virtual void SAL_CALL removeEventListener( const Reference< XEventListener >& rxListener ) throw(RuntimeException);
 
     // XServiceInfo
-    virtual OUString SAL_CALL
-        getImplementationName()
-            throw(RuntimeException);
-    virtual sal_Bool SAL_CALL
-        supportsService( const OUString& rServiceName )
-            throw(RuntimeException);
-    virtual Sequence< OUString > SAL_CALL
-        getSupportedServiceNames()
-            throw(RuntimeException);
-
-
-    static inline OUString
-        getImplementationName_Static() throw();
-    static Sequence< OUString >
-        getSupportedServiceNames_Static() throw();
+    virtual OUString SAL_CALL getImplementationName() throw(RuntimeException);
+    virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw(RuntimeException);
+    virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(RuntimeException);
+
+
+    static inline OUString  getImplementationName_Static() throw();
+    static Sequence< OUString > getSupportedServiceNames_Static() throw();
 };
 
 inline OUString MacSpellChecker::getImplementationName_Static() throw()
diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
old mode 100644
new mode 100755
index 8486f4fb38fd..d85595e996d1
--- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx
+++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
@@ -27,6 +27,7 @@
 
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_lingucomponent.hxx"
+
 #include 
 #include 
 
@@ -37,12 +38,10 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
-
-#ifndef _SPELLIMP_HXX
 #include 
-#endif
 
 #include 
 #include 
@@ -53,8 +52,6 @@
 #include 
 #include 
 
-#include 
-
 #include 
 #include 
 #include 
@@ -77,35 +74,37 @@ using namespace linguistic;
 SpellChecker::SpellChecker() :
     aEvtListeners   ( GetLinguMutex() )
 {
-        aDicts = NULL;
+    aDicts = NULL;
     aDEncs = NULL;
     aDLocs = NULL;
     aDNames = NULL;
     bDisposing = FALSE;
     pPropHelper = NULL;
-        numdict = 0;
+    numdict = 0;
 }
 
 
 SpellChecker::~SpellChecker()
 {
-  if (aDicts) {
-     for (int i = 0; i < numdict; i++) {
+    if (aDicts)
+    {
+       for (int i = 0; i < numdict; i++)
+       {
             if (aDicts[i]) delete aDicts[i];
             aDicts[i] = NULL;
-     }
-     delete[] aDicts;
-  }
-  aDicts = NULL;
-  numdict = 0;
-  if (aDEncs) delete[] aDEncs;
-  aDEncs = NULL;
-  if (aDLocs) delete[] aDLocs;
-  aDLocs = NULL;
-  if (aDNames) delete[] aDNames;
-  aDNames = NULL;
-  if (pPropHelper)
-     pPropHelper->RemoveAsPropListener();
+       }
+       delete[] aDicts;
+    }
+    aDicts = NULL;
+    numdict = 0;
+    if (aDEncs) delete[] aDEncs;
+    aDEncs = NULL;
+    if (aDLocs) delete[] aDLocs;
+    aDLocs = NULL;
+    if (aDNames) delete[] aDNames;
+    aDNames = NULL;
+    if (pPropHelper)
+        pPropHelper->RemoveAsPropListener();
 }
 
 
@@ -217,7 +216,7 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales()
                     for (sal_Int32 i = 0;  i < nLocales;  ++i)
                     {
                         aDicts[k]  = NULL;
-                        aDEncs[k]  = 0;
+                        aDEncs[k]  = RTL_TEXTENCODING_DONTKNOW;
                         aDLocs[k]  = MsLangId::convertLanguageToLocale(
                                         MsLangId::convertIsoStringToLanguage( aLocaleNames[i] ));
                         // also both files have to be in the same directory and the
@@ -272,84 +271,86 @@ sal_Bool SAL_CALL SpellChecker::hasLocale(const Locale& rLocale)
     return bRes;
 }
 
+
 INT16 SpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rLocale )
 {
-        Hunspell * pMS;
-        rtl_TextEncoding aEnc;
+    Hunspell * pMS = NULL;
+    rtl_TextEncoding eEnc = RTL_TEXTENCODING_DONTKNOW;
 
     // initialize a myspell object for each dictionary once
-        // (note: mutex is held higher up in isValid)
-
+    // (note: mutex is held higher up in isValid)
 
     INT16 nRes = -1;
 
-        // first handle smart quotes both single and double
+    // first handle smart quotes both single and double
     OUStringBuffer rBuf(rWord);
-        sal_Int32 n = rBuf.getLength();
-        sal_Unicode c;
-    for (sal_Int32 ix=0; ix < n; ix++) {
+    sal_Int32 n = rBuf.getLength();
+    sal_Unicode c;
+    for (sal_Int32 ix=0; ix < n; ix++)
+    {
         c = rBuf.charAt(ix);
-            if ((c == 0x201C) || (c == 0x201D)) rBuf.setCharAt(ix,(sal_Unicode)0x0022);
-            if ((c == 0x2018) || (c == 0x2019)) rBuf.setCharAt(ix,(sal_Unicode)0x0027);
-        }
-        OUString nWord(rBuf.makeStringAndClear());
+        if ((c == 0x201C) || (c == 0x201D))
+            rBuf.setCharAt(ix,(sal_Unicode)0x0022);
+        if ((c == 0x2018) || (c == 0x2019))
+            rBuf.setCharAt(ix,(sal_Unicode)0x0027);
+    }
+    OUString nWord(rBuf.makeStringAndClear());
 
     if (n)
     {
-            for (sal_Int32 i = 0; i < numdict; ++i) {
+        for (sal_Int32 i = 0; i < numdict; ++i)
+        {
             pMS = NULL;
-                aEnc = 0;
+            eEnc = RTL_TEXTENCODING_DONTKNOW;
 
             if (rLocale == aDLocs[i])
             {
-                   if (!aDicts[i])
-                   {
-                      OUString dicpath = aDNames[i] + A2OU(".dic");
-                      OUString affpath = aDNames[i] + A2OU(".aff");
-                      OUString dict;
-                      OUString aff;
-                  osl::FileBase::getSystemPathFromFileURL(dicpath,dict);
-                   osl::FileBase::getSystemPathFromFileURL(affpath,aff);
-                      OString aTmpaff(OU2ENC(aff,osl_getThreadTextEncoding()));
-                      OString aTmpdict(OU2ENC(dict,osl_getThreadTextEncoding()));
+                if (!aDicts[i])
+                {
+                    OUString dicpath = aDNames[i] + A2OU(".dic");
+                    OUString affpath = aDNames[i] + A2OU(".aff");
+                    OUString dict;
+                    OUString aff;
+                    osl::FileBase::getSystemPathFromFileURL(dicpath,dict);
+                    osl::FileBase::getSystemPathFromFileURL(affpath,aff);
+                    OString aTmpaff(OU2ENC(aff,osl_getThreadTextEncoding()));
+                    OString aTmpdict(OU2ENC(dict,osl_getThreadTextEncoding()));
 
 #if defined(WNT)
-                      // workaround for Windows specifc problem that the
-                      // path length in calls to 'fopen' is limted to somewhat
-                      // about 120+ characters which will usually be exceed when
-                      // using dictionaries as extensions.
-                      aTmpaff = Win_GetShortPathName( aff );
-                      aTmpdict = Win_GetShortPathName( dict );
+                    // workaround for Windows specifc problem that the
+                    // path length in calls to 'fopen' is limted to somewhat
+                    // about 120+ characters which will usually be exceed when
+                    // using dictionaries as extensions.
+                    aTmpaff = Win_GetShortPathName( aff );
+                    aTmpdict = Win_GetShortPathName( dict );
 #endif
 
-                      aDicts[i] = new Hunspell(aTmpaff.getStr(),aTmpdict.getStr());
-                      aDEncs[i] = 0;
-                      if (aDicts[i]) {
-                        char * dic_encoding = aDicts[i]->get_dic_encoding();
-            aDEncs[i] = rtl_getTextEncodingFromUnixCharset(aDicts[i]->get_dic_encoding());
-                        if (aDEncs[i] == RTL_TEXTENCODING_DONTKNOW) {
-              if (strcmp("ISCII-DEVANAGARI", dic_encoding) == 0) {
-                aDEncs[i] = RTL_TEXTENCODING_ISCII_DEVANAGARI;
-                          } else if (strcmp("UTF-8", dic_encoding) == 0) {
-                aDEncs[i] = RTL_TEXTENCODING_UTF8;
-                          }
-                        }
-                      }
-               }
-               pMS = aDicts[i];
-                   aEnc = aDEncs[i];
-        }
+                    aDicts[i] = new Hunspell(aTmpaff.getStr(),aTmpdict.getStr());
+                    aDEncs[i] = RTL_TEXTENCODING_DONTKNOW;
+                    if (aDicts[i])
+                        aDEncs[i] = getTextEncodingFromCharset(aDicts[i]->get_dic_encoding());
+                }
+                pMS = aDicts[i];
+                eEnc = aDEncs[i];
+            }
+
+            // we don't want to work with a default text encoding since following incorrect
+            // results may occur only for specific text and thus may be hard to notice.
+            // Thus better always make a clean exit here if the text encoding is in question.
+            // Hopefully something not working at all will raise proper attention quickly. ;-)
+            DBG_ASSERT( eEnc != RTL_TEXTENCODING_DONTKNOW, "failed to get text encoding! (maybe incorrect encoding string in file)" );
+            if (eEnc == RTL_TEXTENCODING_DONTKNOW)
+                return -1;
+
             if (pMS)
-                {
-            OString aWrd(OU2ENC(nWord,aEnc));
+            {
+                OString aWrd(OU2ENC(nWord,eEnc));
                 int rVal = pMS->spell((char*)aWrd.getStr());
-                 if (rVal != 1)
-                    {
-                        nRes = SpellFailure::SPELLING_ERROR;
-                    } else {
-                        return -1;
-                    }
-                    pMS = NULL;
+                if (rVal != 1)
+                    nRes = SpellFailure::SPELLING_ERROR;
+                else
+                    return -1;
+                pMS = NULL;
             }
         }
     }
@@ -358,8 +359,7 @@ INT16 SpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rLocal
 }
 
 
-sal_Bool SAL_CALL
-    SpellChecker::isValid( const OUString& rWord, const Locale& rLocale,
+sal_Bool SAL_CALL SpellChecker::isValid( const OUString& rWord, const Locale& rLocale,
             const PropertyValues& rProperties )
         throw(IllegalArgumentException, RuntimeException)
 {
@@ -390,11 +390,11 @@ sal_Bool SAL_CALL
     {
         INT16 nLang = LocaleToLanguage( rLocale );
         // postprocess result for errors that should be ignored
-        if (   (!rHelper.IsSpellUpperCase()  && IsUpper( rWord, nLang ))
-            || (!rHelper.IsSpellWithDigits() && HasDigits( rWord ))
-            || (!rHelper.IsSpellCapitalization()
-                &&  nFailure == SpellFailure::CAPTION_ERROR)
-        )
+        const bool bIgnoreError =
+                (!rHelper.IsSpellUpperCase()  && IsUpper( rWord, nLang )) ||
+                (!rHelper.IsSpellWithDigits() && HasDigits( rWord )) ||
+                (!rHelper.IsSpellCapitalization()  &&  nFailure == SpellFailure::CAPTION_ERROR);
+        if (bIgnoreError)
             nFailure = -1;
     }
 
@@ -410,23 +410,26 @@ Reference< XSpellAlternatives >
     // Especially it may give a list of suggested (correct) words:
 
     Reference< XSpellAlternatives > xRes;
-        // note: mutex is held by higher up by spell which covers both
+    // note: mutex is held by higher up by spell which covers both
 
-        Hunspell* pMS;
-        rtl_TextEncoding aEnc;
-    int count;
-        int numsug = 0;
+    Hunspell* pMS = NULL;
+    rtl_TextEncoding eEnc = RTL_TEXTENCODING_DONTKNOW;
+    int count = 0;
+    int numsug = 0;
 
-        // first handle smart quotes (single and double)
+    // first handle smart quotes (single and double)
     OUStringBuffer rBuf(rWord);
-        sal_Int32 n = rBuf.getLength();
-        sal_Unicode c;
-    for (sal_Int32 ix=0; ix < n; ix++) {
-         c = rBuf.charAt(ix);
-             if ((c == 0x201C) || (c == 0x201D)) rBuf.setCharAt(ix,(sal_Unicode)0x0022);
-             if ((c == 0x2018) || (c == 0x2019)) rBuf.setCharAt(ix,(sal_Unicode)0x0027);
-        }
-        OUString nWord(rBuf.makeStringAndClear());
+    sal_Int32 n = rBuf.getLength();
+    sal_Unicode c;
+    for (sal_Int32 ix=0; ix < n; ix++)
+    {
+        c = rBuf.charAt(ix);
+        if ((c == 0x201C) || (c == 0x201D))
+            rBuf.setCharAt(ix,(sal_Unicode)0x0022);
+        if ((c == 0x2018) || (c == 0x2019))
+            rBuf.setCharAt(ix,(sal_Unicode)0x0027);
+    }
+    OUString nWord(rBuf.makeStringAndClear());
 
     if (n)
     {
@@ -434,59 +437,57 @@ Reference< XSpellAlternatives >
 
         Sequence< OUString > aStr( 0 );
 
-            for (int i =0; i < numdict; i++) {
+        for (int i =0; i < numdict; i++)
+        {
             pMS = NULL;
-                aEnc = 0;
-                count = 0;
+            eEnc = RTL_TEXTENCODING_DONTKNOW;
+            count = 0;
 
             if (rLocale == aDLocs[i])
             {
-                    pMS = aDicts[i];
-                    aEnc = aDEncs[i];
-                }
+                pMS = aDicts[i];
+                eEnc = aDEncs[i];
+            }
 
             if (pMS)
             {
                 char ** suglst = NULL;
-            OString aWrd(OU2ENC(nWord,aEnc));
-                    count = pMS->suggest(&suglst, (const char *) aWrd.getStr());
-
-                    if (count) {
-
-                   aStr.realloc( numsug + count );
-                   OUString *pStr = aStr.getArray();
-                       for (int ii=0; ii < count; ii++)
-                       {
-                          // if needed add: if (suglst[ii] == NULL) continue;
-                          OUString cvtwrd(suglst[ii],strlen(suglst[ii]),aEnc);
-                          pStr[numsug + ii] = cvtwrd;
-                          free(suglst[ii]);
-                       }
-                       free(suglst);
-                       numsug += count;
+                OString aWrd(OU2ENC(nWord,eEnc));
+                count = pMS->suggest(&suglst, (const char *) aWrd.getStr());
+
+                if (count)
+                {
+                    aStr.realloc( numsug + count );
+                    OUString *pStr = aStr.getArray();
+                    for (int ii=0; ii < count; ii++)
+                    {
+                       // if needed add: if (suglst[ii] == NULL) continue;
+                       OUString cvtwrd(suglst[ii],strlen(suglst[ii]),eEnc);
+                       pStr[numsug + ii] = cvtwrd;
+                       free(suglst[ii]);
                     }
-        }
+                    free(suglst);
+                    numsug += count;
+                }
+            }
         }
 
-            // now return an empty alternative for no suggestions or the list of alternatives if some found
+        // now return an empty alternative for no suggestions or the list of alternatives if some found
         SpellAlternatives *pAlt = new SpellAlternatives;
-            String aTmp(rWord);
+        String aTmp(rWord);
         pAlt->SetWordLanguage( aTmp, nLang );
         pAlt->SetFailureType( SpellFailure::SPELLING_ERROR );
         pAlt->SetAlternatives( aStr );
         xRes = pAlt;
-            return xRes;
-
-    }
         return xRes;
+    }
+    return xRes;
 }
 
 
-
-
-Reference< XSpellAlternatives > SAL_CALL
-    SpellChecker::spell( const OUString& rWord, const Locale& rLocale,
-            const PropertyValues& rProperties )
+Reference< XSpellAlternatives > SAL_CALL SpellChecker::spell(
+        const OUString& rWord, const Locale& rLocale,
+        const PropertyValues& rProperties )
         throw(IllegalArgumentException, RuntimeException)
 {
     MutexGuard  aGuard( GetLinguMutex() );
@@ -511,7 +512,7 @@ Reference< XSpellAlternatives > SAL_CALL
 
 
 Reference< XInterface > SAL_CALL SpellChecker_CreateInstance(
-            const Reference< XMultiServiceFactory > & /*rSMgr*/ )
+        const Reference< XMultiServiceFactory > & /*rSMgr*/ )
         throw(Exception)
 {
 
@@ -520,9 +521,8 @@ Reference< XInterface > SAL_CALL SpellChecker_CreateInstance(
 }
 
 
-sal_Bool SAL_CALL
-    SpellChecker::addLinguServiceEventListener(
-            const Reference< XLinguServiceEventListener >& rxLstnr )
+sal_Bool SAL_CALL SpellChecker::addLinguServiceEventListener(
+        const Reference< XLinguServiceEventListener >& rxLstnr )
         throw(RuntimeException)
 {
     MutexGuard  aGuard( GetLinguMutex() );
@@ -536,9 +536,8 @@ sal_Bool SAL_CALL
 }
 
 
-sal_Bool SAL_CALL
-    SpellChecker::removeLinguServiceEventListener(
-            const Reference< XLinguServiceEventListener >& rxLstnr )
+sal_Bool SAL_CALL SpellChecker::removeLinguServiceEventListener(
+        const Reference< XLinguServiceEventListener >& rxLstnr )
         throw(RuntimeException)
 {
     MutexGuard  aGuard( GetLinguMutex() );
@@ -553,8 +552,7 @@ sal_Bool SAL_CALL
 }
 
 
-OUString SAL_CALL
-    SpellChecker::getServiceDisplayName( const Locale& /*rLocale*/ )
+OUString SAL_CALL SpellChecker::getServiceDisplayName( const Locale& /*rLocale*/ )
         throw(RuntimeException)
 {
     MutexGuard  aGuard( GetLinguMutex() );
@@ -562,8 +560,7 @@ OUString SAL_CALL
 }
 
 
-void SAL_CALL
-    SpellChecker::initialize( const Sequence< Any >& rArguments )
+void SAL_CALL SpellChecker::initialize( const Sequence< Any >& rArguments )
         throw(Exception, RuntimeException)
 {
     MutexGuard  aGuard( GetLinguMutex() );
@@ -585,16 +582,15 @@ void SAL_CALL
             xPropHelper = pPropHelper;
             pPropHelper->AddAsPropListener();   //! after a reference is established
         }
-        else {
+        else
+        {
             DBG_ERROR( "wrong number of arguments in sequence" );
         }
-
     }
 }
 
 
-void SAL_CALL
-    SpellChecker::dispose()
+void SAL_CALL SpellChecker::dispose()
         throw(RuntimeException)
 {
     MutexGuard  aGuard( GetLinguMutex() );
@@ -608,8 +604,7 @@ void SAL_CALL
 }
 
 
-void SAL_CALL
-    SpellChecker::addEventListener( const Reference< XEventListener >& rxListener )
+void SAL_CALL SpellChecker::addEventListener( const Reference< XEventListener >& rxListener )
         throw(RuntimeException)
 {
     MutexGuard  aGuard( GetLinguMutex() );
@@ -619,8 +614,7 @@ void SAL_CALL
 }
 
 
-void SAL_CALL
-    SpellChecker::removeEventListener( const Reference< XEventListener >& rxListener )
+void SAL_CALL SpellChecker::removeEventListener( const Reference< XEventListener >& rxListener )
         throw(RuntimeException)
 {
     MutexGuard  aGuard( GetLinguMutex() );
diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.hxx b/lingucomponent/source/spellcheck/spell/sspellimp.hxx
old mode 100644
new mode 100755
index 94c57fa8b742..9bcbdec5250b
--- a/lingucomponent/source/spellcheck/spell/sspellimp.hxx
+++ b/lingucomponent/source/spellcheck/spell/sspellimp.hxx
@@ -69,11 +69,11 @@ class SpellChecker :
     >
 {
     Sequence< Locale >                 aSuppLocales;
-        Hunspell **                         aDicts;
-        rtl_TextEncoding *                 aDEncs;
-        Locale *                           aDLocs;
-        OUString *                         aDNames;
-        sal_Int32                          numdict;
+    Hunspell **                        aDicts;
+    rtl_TextEncoding *                 aDEncs;
+    Locale *                           aDLocs;
+    OUString *                         aDNames;
+    sal_Int32                          numdict;
 
     ::cppu::OInterfaceContainerHelper       aEvtListeners;
     Reference< XPropertyChangeListener >    xPropHelper;
@@ -91,84 +91,43 @@ class SpellChecker :
     }
 
     INT16   GetSpellFailure( const OUString &rWord, const Locale &rLocale );
-    Reference< XSpellAlternatives >
-            GetProposals( const OUString &rWord, const Locale &rLocale );
+    Reference< XSpellAlternatives > GetProposals( const OUString &rWord, const Locale &rLocale );
 
 public:
     SpellChecker();
     virtual ~SpellChecker();
 
     // XSupportedLocales (for XSpellChecker)
-    virtual Sequence< Locale > SAL_CALL
-        getLocales()
-            throw(RuntimeException);
-    virtual sal_Bool SAL_CALL
-        hasLocale( const Locale& rLocale )
-            throw(RuntimeException);
+    virtual Sequence< Locale > SAL_CALL getLocales() throw(RuntimeException);
+    virtual sal_Bool SAL_CALL hasLocale( const Locale& rLocale ) throw(RuntimeException);
 
     // XSpellChecker
-    virtual sal_Bool SAL_CALL
-        isValid( const OUString& rWord, const Locale& rLocale,
-                const PropertyValues& rProperties )
-            throw(IllegalArgumentException,
-                  RuntimeException);
-    virtual Reference< XSpellAlternatives > SAL_CALL
-        spell( const OUString& rWord, const Locale& rLocale,
-                const PropertyValues& rProperties )
-            throw(IllegalArgumentException,
-                  RuntimeException);
+    virtual sal_Bool SAL_CALL isValid( const OUString& rWord, const Locale& rLocale, const PropertyValues& rProperties ) throw(IllegalArgumentException, RuntimeException);
+    virtual Reference< XSpellAlternatives > SAL_CALL spell( const OUString& rWord, const Locale& rLocale, const PropertyValues& rProperties ) throw(IllegalArgumentException, RuntimeException);
 
     // XLinguServiceEventBroadcaster
-    virtual sal_Bool SAL_CALL
-        addLinguServiceEventListener(
-            const Reference< XLinguServiceEventListener >& rxLstnr )
-            throw(RuntimeException);
-    virtual sal_Bool SAL_CALL
-        removeLinguServiceEventListener(
-            const Reference< XLinguServiceEventListener >& rxLstnr )
-            throw(RuntimeException);
+    virtual sal_Bool SAL_CALL addLinguServiceEventListener( const Reference< XLinguServiceEventListener >& rxLstnr ) throw(RuntimeException);
+    virtual sal_Bool SAL_CALL removeLinguServiceEventListener( const Reference< XLinguServiceEventListener >& rxLstnr ) throw(RuntimeException);
 
     // XServiceDisplayName
-    virtual OUString SAL_CALL
-        getServiceDisplayName( const Locale& rLocale )
-            throw(RuntimeException);
+    virtual OUString SAL_CALL getServiceDisplayName( const Locale& rLocale ) throw(RuntimeException);
 
     // XInitialization
-    virtual void SAL_CALL
-        initialize( const Sequence< Any >& rArguments )
-            throw(Exception, RuntimeException);
+    virtual void SAL_CALL initialize( const Sequence< Any >& rArguments ) throw(Exception, RuntimeException);
 
     // XComponent
-    virtual void SAL_CALL
-        dispose()
-            throw(RuntimeException);
-    virtual void SAL_CALL
-        addEventListener( const Reference< XEventListener >& rxListener )
-            throw(RuntimeException);
-    virtual void SAL_CALL
-        removeEventListener( const Reference< XEventListener >& rxListener )
-            throw(RuntimeException);
-
-    ////////////////////////////////////////////////////////////
-    // Service specific part
-    //
+    virtual void SAL_CALL dispose() throw(RuntimeException);
+    virtual void SAL_CALL addEventListener( const Reference< XEventListener >& rxListener ) throw(RuntimeException);
+    virtual void SAL_CALL removeEventListener( const Reference< XEventListener >& rxListener ) throw(RuntimeException);
 
     // XServiceInfo
-    virtual OUString SAL_CALL
-        getImplementationName()
-            throw(RuntimeException);
-    virtual sal_Bool SAL_CALL
-        supportsService( const OUString& rServiceName )
-            throw(RuntimeException);
-    virtual Sequence< OUString > SAL_CALL
-        getSupportedServiceNames()
-            throw(RuntimeException);
-
-
-    static inline OUString
-        getImplementationName_Static() throw();
-    static Sequence< OUString >
-        getSupportedServiceNames_Static() throw();
+    virtual OUString SAL_CALL getImplementationName() throw(RuntimeException);
+    virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw(RuntimeException);
+    virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(RuntimeException);
+
+
+    static inline OUString  getImplementationName_Static() throw();
+    static Sequence< OUString > getSupportedServiceNames_Static() throw();
 };
 
 inline OUString SpellChecker::getImplementationName_Static() throw()
@@ -177,7 +136,6 @@ inline OUString SpellChecker::getImplementationName_Static() throw()
 }
 
 
-
 ///////////////////////////////////////////////////////////////////////////
 
 #endif
diff --git a/lingucomponent/source/thesaurus/libnth/nthesdta.hxx b/lingucomponent/source/thesaurus/libnth/nthesdta.hxx
old mode 100644
new mode 100755
index 259bf5454359..23804d54f60f
--- a/lingucomponent/source/thesaurus/libnth/nthesdta.hxx
+++ b/lingucomponent/source/thesaurus/libnth/nthesdta.hxx
@@ -48,11 +48,11 @@ class Meaning :
 {
     ::com::sun::star::uno::Sequence< ::rtl::OUString >  aSyn;   // list of synonyms, may be empty.
     ::rtl::OUString         aTerm;
-    INT16               nLanguage;
+    INT16                   nLanguage;
 
 #if 0
         // this is for future use by a German thesaurus
-        BOOL                            bIsGermanPreReform;
+        BOOL                bIsGermanPreReform;
 #endif
 
     // disallow copy-constructor and assignment-operator for now
@@ -68,22 +68,12 @@ public:
     virtual ~Meaning();
 
     // XMeaning
-    virtual ::rtl::OUString SAL_CALL
-        getMeaning()
-            throw(::com::sun::star::uno::RuntimeException);
-
-    virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
-        querySynonyms()
-            throw(::com::sun::star::uno::RuntimeException);
+    virtual ::rtl::OUString SAL_CALL getMeaning() throw(::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL querySynonyms() throw(::com::sun::star::uno::RuntimeException);
 
     // non-interface specific functions
-        void    SetSynonyms(
-                    const ::com::sun::star::uno::Sequence< ::rtl::OUString >
-                    &rSyn );
-
-        void    SetMeaning(const ::rtl::OUString  &rTerm );
-
-
+    void    SetSynonyms( const ::com::sun::star::uno::Sequence< ::rtl::OUString > &rSyn );
+    void    SetMeaning( const ::rtl::OUString  &rTerm );
 };
 
 
diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
old mode 100644
new mode 100755
index bd6afffdbd6a..857381b2c811
--- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
+++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
@@ -28,9 +28,7 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_lingucomponent.hxx"
 
-// include 
 #include 
-
 #include    // helper for factories
 #include 
 #include 
@@ -100,23 +98,27 @@ Thesaurus::Thesaurus() :
     aTEncs = NULL;
     aTLocs = NULL;
     aTNames = NULL;
-        numthes = 0;
+    numthes = 0;
 }
 
 
 Thesaurus::~Thesaurus()
 {
 
-    if (aThes) {
-        for (int i = 0; i < numthes; i++) {
+    if (aThes)
+    {
+        for (int i = 0; i < numthes; i++)
+        {
             if (aThes[i]) delete aThes[i];
             aThes[i] = NULL;
         }
         delete[] aThes;
     }
     aThes = NULL;
-    if (aCharSetInfo) {
-        for (int i = 0; i < numthes; i++) {
+    if (aCharSetInfo)
+    {
+        for (int i = 0; i < numthes; i++)
+        {
             if (aCharSetInfo[i]) delete aCharSetInfo[i];
             aCharSetInfo[i] = NULL;
         }
@@ -244,7 +246,7 @@ Sequence< Locale > SAL_CALL Thesaurus::getLocales()
                     for (sal_Int32 i = 0;  i < nLocales;  ++i)
                     {
                         aThes[k]  = NULL;
-                        aTEncs[k]  = 0;
+                        aTEncs[k]  = RTL_TEXTENCODING_DONTKNOW;
                         aTLocs[k]  = MsLangId::convertLanguageToLocale(
                                         MsLangId::convertIsoStringToLanguage( aDictIt->aLocaleNames[i] ));
                         aCharSetInfo[k] = new CharClass( aTLocs[k] );
@@ -302,28 +304,28 @@ sal_Bool SAL_CALL Thesaurus::hasLocale(const Locale& rLocale)
 }
 
 
-Sequence < Reference < ::com::sun::star::linguistic2::XMeaning > > SAL_CALL
-        Thesaurus::queryMeanings( const OUString& qTerm, const Locale& rLocale,
-                                  const PropertyValues& rProperties)
-                                  throw(IllegalArgumentException, RuntimeException)
+Sequence < Reference < ::com::sun::star::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryMeanings(
+    const OUString& qTerm, const Locale& rLocale,
+    const PropertyValues& rProperties)
+    throw(IllegalArgumentException, RuntimeException)
 {
-        MutexGuard      aGuard( GetLinguMutex() );
+    MutexGuard      aGuard( GetLinguMutex() );
 
-        uno::Sequence< Reference< XMeaning > > aMeanings( 1 );
-        uno::Sequence< Reference< XMeaning > > noMeanings( 0 );
-        uno::Reference< XLinguServiceManager > xLngSvcMgr( GetLngSvcMgr_Impl() );
-        uno::Reference< XSpellChecker1 > xSpell;
+    uno::Sequence< Reference< XMeaning > > aMeanings( 1 );
+    uno::Sequence< Reference< XMeaning > > noMeanings( 0 );
+    uno::Reference< XLinguServiceManager > xLngSvcMgr( GetLngSvcMgr_Impl() );
+    uno::Reference< XSpellChecker1 > xSpell;
 
-        OUString rTerm(qTerm);
-        OUString pTerm(qTerm);
-        sal_uInt16 ct = CAPTYPE_UNKNOWN;
-        sal_Int32 stem = 0;
-        sal_Int32 stem2 = 0;
+    OUString rTerm(qTerm);
+    OUString pTerm(qTerm);
+    sal_uInt16 ct = CAPTYPE_UNKNOWN;
+    sal_Int32 stem = 0;
+    sal_Int32 stem2 = 0;
 
-        INT16 nLanguage = LocaleToLanguage( rLocale );
+    INT16 nLanguage = LocaleToLanguage( rLocale );
 
-        if (nLanguage == LANGUAGE_NONE  || !rTerm.getLength())
-                return noMeanings;
+    if (nLanguage == LANGUAGE_NONE || !rTerm.getLength())
+        return noMeanings;
 
     if (!hasLocale( rLocale ))
 #ifdef LINGU_EXCEPTIONS
@@ -332,195 +334,202 @@ Sequence < Reference < ::com::sun::star::linguistic2::XMeaning > > SAL_CALL
         return noMeanings;
 #endif
 
-        if (prevTerm == qTerm && prevLocale == nLanguage) return prevMeanings;
+    if (prevTerm == qTerm && prevLocale == nLanguage)
+        return prevMeanings;
 
-        mentry * pmean = NULL;
+    mentry * pmean = NULL;
     sal_Int32 nmean = 0;
 
-        PropertyHelper_Thes &rHelper = GetPropHelper();
-        rHelper.SetTmpPropVals( rProperties );
+    PropertyHelper_Thes &rHelper = GetPropHelper();
+    rHelper.SetTmpPropVals( rProperties );
 
-        MyThes * pTH = NULL;
-        rtl_TextEncoding aEnc = 0;
-        CharClass * pCC = NULL;
+    MyThes * pTH = NULL;
+    rtl_TextEncoding eEnc = RTL_TEXTENCODING_DONTKNOW;
+    CharClass * pCC = NULL;
 
-        // find the first thesaurus that matches the locale
-        for (int i =0; i < numthes; i++) {
-            if (rLocale == aTLocs[i])
+    // find the first thesaurus that matches the locale
+    for (int i =0; i < numthes; i++)
+    {
+        if (rLocale == aTLocs[i])
+        {
+            // open up and intialize this thesaurus if need be
+            if (!aThes[i])
             {
-           // open up and intialize this thesaurus if need be
-                   if (!aThes[i])
-                   {
-                      OUString datpath = aTNames[i] + A2OU(".dat");
-                      OUString idxpath = aTNames[i] + A2OU(".idx");
-                      OUString ndat;
-                      OUString nidx;
-                      osl::FileBase::getSystemPathFromFileURL(datpath,ndat);
-                      osl::FileBase::getSystemPathFromFileURL(idxpath,nidx);
-                      OString aTmpidx(OU2ENC(nidx,osl_getThreadTextEncoding()));
-                      OString aTmpdat(OU2ENC(ndat,osl_getThreadTextEncoding()));
+                OUString datpath = aTNames[i] + A2OU(".dat");
+                OUString idxpath = aTNames[i] + A2OU(".idx");
+                OUString ndat;
+                OUString nidx;
+                osl::FileBase::getSystemPathFromFileURL(datpath,ndat);
+                osl::FileBase::getSystemPathFromFileURL(idxpath,nidx);
+                OString aTmpidx(OU2ENC(nidx,osl_getThreadTextEncoding()));
+                OString aTmpdat(OU2ENC(ndat,osl_getThreadTextEncoding()));
 
 #if defined(WNT)
-                      // workaround for Windows specifc problem that the
-                      // path length in calls to 'fopen' is limted to somewhat
-                      // about 120+ characters which will usually be exceed when
-                      // using dictionaries as extensions.
-                      aTmpidx = Win_GetShortPathName( nidx );
-                      aTmpdat = Win_GetShortPathName( ndat );
+                // workaround for Windows specifc problem that the
+                // path length in calls to 'fopen' is limted to somewhat
+                // about 120+ characters which will usually be exceed when
+                // using dictionaries as extensions.
+                aTmpidx = Win_GetShortPathName( nidx );
+                aTmpdat = Win_GetShortPathName( ndat );
 #endif
 
-                      aThes[i] = new MyThes(aTmpidx.getStr(),aTmpdat.getStr());
-                      if (aThes[i]) {
-                        const char * enc_string = aThes[i]->get_th_encoding();
-                        if (!enc_string) {
-                          aTEncs[i] = rtl_getTextEncodingFromUnixCharset("ISO8859-1");
-                        } else {
-                          aTEncs[i] = rtl_getTextEncodingFromUnixCharset(enc_string);
-                          if (aTEncs[i] == RTL_TEXTENCODING_DONTKNOW) {
-                            if (strcmp("ISCII-DEVANAGARI", enc_string) == 0) {
-                              aTEncs[i] = RTL_TEXTENCODING_ISCII_DEVANAGARI;
-                            } else if (strcmp("UTF-8", enc_string) == 0) {
-                              aTEncs[i] = RTL_TEXTENCODING_UTF8;
-                            }
-                          }
-                      }
-                   }
-               }
-               pTH = aThes[i];
-                   aEnc = aTEncs[i];
-                   pCC = aCharSetInfo[i];
-
-               if (pTH)
-                   break;
+                aThes[i] = new MyThes(aTmpidx.getStr(),aTmpdat.getStr());
+                if (aThes[i])
+                    aTEncs[i] = getTextEncodingFromCharset(aThes[i]->get_th_encoding());
+            }
+            pTH = aThes[i];
+            eEnc = aTEncs[i];
+            pCC = aCharSetInfo[i];
+
+            if (pTH)
+                break;
         }
     }
 
-        while (pTH) {
-         // convert word to all lower case for searching
-             if (!stem) ct = capitalType(rTerm, pCC);
-             OUString nTerm(makeLowerCase(rTerm, pCC));
-             OString aTmp( OU2ENC(nTerm, aEnc) );
-             nmean = pTH->Lookup(aTmp.getStr(),aTmp.getLength(),&pmean);
+    // we don't want to work with a default text encoding since following incorrect
+    // results may occur only for specific text and thus may be hard to notice.
+    // Thus better always make a clean exit here if the text encoding is in question.
+    // Hopefully something not working at all will raise proper attention quickly. ;-)
+    DBG_ASSERT( eEnc != RTL_TEXTENCODING_DONTKNOW, "failed to get text encoding! (maybe incorrect encoding string in file)" );
+    if (eEnc == RTL_TEXTENCODING_DONTKNOW)
+        return noMeanings;
+
+    while (pTH)
+    {
+        // convert word to all lower case for searching
+        if (!stem)
+            ct = capitalType(rTerm, pCC);
+        OUString nTerm(makeLowerCase(rTerm, pCC));
+        OString aTmp( OU2ENC(nTerm, eEnc) );
+        nmean = pTH->Lookup(aTmp.getStr(),aTmp.getLength(),&pmean);
 
-             if (nmean) aMeanings.realloc( nmean );
+        if (nmean)
+            aMeanings.realloc( nmean );
 
-             mentry * pe = pmean;
-             OUString codeTerm = qTerm;
-         Reference< XSpellAlternatives > xTmpRes2;
+        mentry * pe = pmean;
+        OUString codeTerm = qTerm;
+        Reference< XSpellAlternatives > xTmpRes2;
 
-         if (stem) {
-               xTmpRes2 = xSpell->spell( A2OU("") +
+        if (stem)
+        {
+            xTmpRes2 = xSpell->spell( A2OU("") +
             pTerm + A2OU(""), nLanguage, rProperties );
-               if (xTmpRes2.is()) {
-                 Sequenceseq = xTmpRes2->getAlternatives();
-                 if (seq.getLength() > 0) {
+            if (xTmpRes2.is())
+            {
+                Sequenceseq = xTmpRes2->getAlternatives();
+                if (seq.getLength() > 0)
+                {
                     codeTerm = seq[0];
                     stem2 = 1;
-                 }
+                }
 #if 0
-                 OString o = OUStringToOString(codeTerm, rtl_getTextEncodingFromUnixCharset("UTF-8"));
-                 fprintf(stderr, "CODETERM: %s\n", o.pData->buffer);
+                OString o = OUStringToOString(codeTerm, RTL_TEXTENCODING_UTF8);
+                fprintf(stderr, "CODETERM: %s\n", o.pData->buffer);
 #endif
-               }
-             }
-
-         for (int j = 0; j < nmean; j++) {
-             int count = pe->count;
-                 if (count) {
-                     Sequence< OUString > aStr( count );
-                     OUString *pStr = aStr.getArray();
-
-                     for (int i=0; i < count; i++) {
-                       OUString sTerm(pe->psyns[i],strlen(pe->psyns[i]),aEnc );
-                       sal_Int32 catpos = sTerm.indexOf('(');
-                       sal_Int32 catpos2 = 0;
-                       OUString catst;
-                       OUString catst2;
-                       if (catpos > 2) {
-                         // remove category name for affixation and casing
-                         catst = A2OU(" ") + sTerm.copy(catpos);
-                         sTerm = sTerm.copy(0, catpos);
-                         sTerm = sTerm.trim();
-                       }
-                       // generate synonyms with affixes
-                       if (stem && stem2) {
-                 Reference< XSpellAlternatives > xTmpRes;
-                 xTmpRes = xSpell->spell( A2OU("") +
-                 sTerm + A2OU("") + codeTerm + A2OU(""), nLanguage, rProperties );
-                 if (xTmpRes.is()) {
-                   Sequenceseq = xTmpRes->getAlternatives();
-                   for (int k = 0; k < seq.getLength(); k++) {
-                     OString o = OUStringToOString(seq[k], rtl_getTextEncodingFromUnixCharset("UTF-8"));
-                   }
-                   if (seq.getLength() > 0) sTerm = seq[0];
-                 }
-               }
-               if (catpos2) sTerm = catst2 + sTerm;
-
-                       sal_uInt16 ct1 = capitalType(sTerm, pCC);
-                       if (CAPTYPE_MIXED == ct1)
-                            ct = ct1;
-                       OUString cTerm;
-                       switch (ct) {
-                       case CAPTYPE_ALLCAP:
-                     {
-                               cTerm = makeUpperCase(sTerm, pCC);
-                               break;
-                             }
-                       case CAPTYPE_INITCAP:
-                     {
-                               cTerm = makeInitCap(sTerm, pCC);
-                               break;
-                             }
-                           default:
-                     {
-                               cTerm = sTerm;
-                               break;
-                             }
-               }
-                       OUString aAlt( cTerm + catst);
-                       pStr[i] = aAlt;
-             }
+            }
+        }
+
+        for (int j = 0; j < nmean; j++)
+        {
+            int count = pe->count;
+            if (count)
+            {
+                Sequence< OUString > aStr( count );
+                OUString *pStr = aStr.getArray();
+
+                for (int i=0; i < count; i++)
+                {
+                    OUString sTerm(pe->psyns[i],strlen(pe->psyns[i]),eEnc );
+                    sal_Int32 catpos = sTerm.indexOf('(');
+                    sal_Int32 catpos2 = 0;
+                    OUString catst;
+                    OUString catst2;
+                    if (catpos > 2)
+                    {
+                        // remove category name for affixation and casing
+                        catst = A2OU(" ") + sTerm.copy(catpos);
+                        sTerm = sTerm.copy(0, catpos);
+                        sTerm = sTerm.trim();
+                    }
+                    // generate synonyms with affixes
+                    if (stem && stem2)
+                    {
+                        Reference< XSpellAlternatives > xTmpRes;
+                        xTmpRes = xSpell->spell( A2OU("") +
+                        sTerm + A2OU("") + codeTerm + A2OU(""), nLanguage, rProperties );
+                        if (xTmpRes.is())
+                        {
+                            Sequenceseq = xTmpRes->getAlternatives();
+                            if (seq.getLength() > 0)
+                                sTerm = seq[0];
+                        }
+                    }
+                    if (catpos2)
+                        sTerm = catst2 + sTerm;
+
+                    sal_uInt16 ct1 = capitalType(sTerm, pCC);
+                    if (CAPTYPE_MIXED == ct1)
+                        ct = ct1;
+                    OUString cTerm;
+                    switch (ct)
+                    {
+                        case CAPTYPE_ALLCAP:
+                            cTerm = makeUpperCase(sTerm, pCC);
+                            break;
+                        case CAPTYPE_INITCAP:
+                            cTerm = makeInitCap(sTerm, pCC);
+                            break;
+                        default:
+                            cTerm = sTerm;
+                            break;
+                    }
+                    OUString aAlt( cTerm + catst);
+                    pStr[i] = aAlt;
+                }
 #if 0
-                     Meaning * pMn = new Meaning(rTerm,nLanguage,rHelper);
+                Meaning * pMn = new Meaning(rTerm,nLanguage,rHelper);
 #endif
-                     Meaning * pMn = new Meaning(rTerm,nLanguage);
-                     OUString dTerm(pe->defn,strlen(pe->defn),aEnc );
-                     pMn->SetMeaning(dTerm);
-                     pMn->SetSynonyms(aStr);
-                     Reference* pMeaning = aMeanings.getArray();
-                     pMeaning[j] = pMn;
-         }
-                 pe++;
-         }
-             pTH->CleanUpAfterLookup(&pmean,nmean);
-
-        if (nmean) {
+                Meaning * pMn = new Meaning(rTerm,nLanguage);
+                OUString dTerm(pe->defn,strlen(pe->defn),eEnc );
+                pMn->SetMeaning(dTerm);
+                pMn->SetSynonyms(aStr);
+                Reference* pMeaning = aMeanings.getArray();
+                pMeaning[j] = pMn;
+            }
+            pe++;
+        }
+        pTH->CleanUpAfterLookup(&pmean,nmean);
+
+        if (nmean)
+        {
             prevTerm = qTerm;
             prevMeanings = aMeanings;
             prevLocale = nLanguage;
             return aMeanings;
-    }
+        }
 
-        if (stem || !xLngSvcMgr.is()) return noMeanings;
+        if (stem || !xLngSvcMgr.is())
+            return noMeanings;
         stem = 1;
 
         xSpell = uno::Reference< XSpellChecker1 >( xLngSvcMgr->getSpellChecker(), UNO_QUERY );
-        if (!xSpell.is() || !xSpell->isValid( A2OU(SPELLML_SUPPORT), nLanguage, rProperties )) {
+        if (!xSpell.is() || !xSpell->isValid( A2OU(SPELLML_SUPPORT), nLanguage, rProperties ))
             return noMeanings;
-        }
         Reference< XSpellAlternatives > xTmpRes;
         xTmpRes = xSpell->spell( A2OU("") +
             rTerm + A2OU(""), nLanguage, rProperties );
-        if (xTmpRes.is()) {
+        if (xTmpRes.is())
+        {
             Sequenceseq = xTmpRes->getAlternatives();
 #if 0
-            for (int i = 0; i < seq.getLength(); i++) {
-                OString o = OUStringToOString(seq[i], rtl_getTextEncodingFromUnixCharset("UTF-8"));
+            for (int i = 0; i < seq.getLength(); i++)
+            {
+                OString o = OUStringToOString(seq[i], RTL_TEXTENCODING_UTF8);
                 fprintf(stderr, "%d: %s\n", i + 1, o.pData->buffer);
             }
 #endif
-            if (seq.getLength() > 0) {
+            if (seq.getLength() > 0)
+            {
                 rTerm = seq[0];  // XXX Use only the first stem
                 continue;
             }
@@ -529,17 +538,21 @@ Sequence < Reference < ::com::sun::star::linguistic2::XMeaning > > SAL_CALL
         // stem the last word of the synonym (for categories after affixation)
         rTerm = rTerm.trim();
         sal_Int32 pos = rTerm.lastIndexOf(' ');
-        if (!pos) return noMeanings;
+        if (!pos)
+            return noMeanings;
         xTmpRes = xSpell->spell( A2OU("") +
             rTerm.copy(pos + 1) + A2OU(""), nLanguage, rProperties );
-        if (xTmpRes.is()) {
+        if (xTmpRes.is())
+        {
             Sequenceseq = xTmpRes->getAlternatives();
-            if (seq.getLength() > 0) {
+            if (seq.getLength() > 0)
+            {
                 pTerm = rTerm.copy(pos + 1);
                 rTerm = rTerm.copy(0, pos + 1) + seq[0];
-#if 0
-                for (int i = 0; i < seq.getLength(); i++) {
-                    OString o = OUStringToOString(seq[i], rtl_getTextEncodingFromUnixCharset("UTF-8"));
+#if  0
+                for (int i = 0; i < seq.getLength(); i++)
+                {
+                    OString o = OUStringToOString(seq[i], RTL_TEXTENCODING_UTF8);
                     fprintf(stderr, "%d: %s\n", i + 1, o.pData->buffer);
                 }
 #endif
@@ -547,12 +560,11 @@ Sequence < Reference < ::com::sun::star::linguistic2::XMeaning > > SAL_CALL
             }
         }
         break;
-        }
+    }
     return noMeanings;
 }
 
 
-
 Reference< XInterface > SAL_CALL Thesaurus_CreateInstance(
             const Reference< XMultiServiceFactory > & /*rSMgr*/ )
         throw(Exception)
@@ -562,8 +574,7 @@ Reference< XInterface > SAL_CALL Thesaurus_CreateInstance(
 }
 
 
-OUString SAL_CALL
-    Thesaurus::getServiceDisplayName( const Locale& /*rLocale*/ )
+OUString SAL_CALL Thesaurus::getServiceDisplayName( const Locale& /*rLocale*/ )
         throw(RuntimeException)
 {
     MutexGuard  aGuard( GetLinguMutex() );
@@ -571,8 +582,7 @@ OUString SAL_CALL
 }
 
 
-void SAL_CALL
-    Thesaurus::initialize( const Sequence< Any >& rArguments )
+void SAL_CALL Thesaurus::initialize( const Sequence< Any >& rArguments )
         throw(Exception, RuntimeException)
 {
     MutexGuard  aGuard( GetLinguMutex() );
@@ -603,24 +613,26 @@ void SAL_CALL
 sal_uInt16 SAL_CALL Thesaurus::capitalType(const OUString& aTerm, CharClass * pCC)
 {
         sal_Int32 tlen = aTerm.getLength();
-        if ((pCC) && (tlen)) {
-              String aStr(aTerm);
-              sal_Int32 nc = 0;
-              for (USHORT tindex = 0; tindex < tlen;  tindex++) {
-               if (pCC->getCharacterType(aStr,tindex) &
-                       ::com::sun::star::i18n::KCharacterType::UPPER) nc++;
-          }
-
-              if (nc == 0) return (sal_uInt16) CAPTYPE_NOCAP;
-
-              if (nc == tlen) return (sal_uInt16) CAPTYPE_ALLCAP;
+        if ((pCC) && (tlen))
+        {
+            String aStr(aTerm);
+            sal_Int32 nc = 0;
+            for (USHORT tindex = 0; tindex < tlen;  tindex++)
+            {
+                if (pCC->getCharacterType(aStr,tindex) &
+                   ::com::sun::star::i18n::KCharacterType::UPPER) nc++;
+            }
 
-              if ((nc == 1) && (pCC->getCharacterType(aStr,0) &
-                      ::com::sun::star::i18n::KCharacterType::UPPER))
-                   return (sal_uInt16) CAPTYPE_INITCAP;
+            if (nc == 0)
+                return (sal_uInt16) CAPTYPE_NOCAP;
+            if (nc == tlen)
+                return (sal_uInt16) CAPTYPE_ALLCAP;
+            if ((nc == 1) && (pCC->getCharacterType(aStr,0) &
+                  ::com::sun::star::i18n::KCharacterType::UPPER))
+                return (sal_uInt16) CAPTYPE_INITCAP;
 
-              return (sal_uInt16) CAPTYPE_MIXED;
-    }
+            return (sal_uInt16) CAPTYPE_MIXED;
+        }
         return (sal_uInt16) CAPTYPE_UNKNOWN;
 }
 
@@ -628,38 +640,40 @@ sal_uInt16 SAL_CALL Thesaurus::capitalType(const OUString& aTerm, CharClass * pC
 
 OUString SAL_CALL Thesaurus::makeLowerCase(const OUString& aTerm, CharClass * pCC)
 {
-        if (pCC)
-      return pCC->toLower_rtl(aTerm, 0, aTerm.getLength());
-        return aTerm;
+    if (pCC)
+        return pCC->toLower_rtl(aTerm, 0, aTerm.getLength());
+    return aTerm;
 }
 
 
 OUString SAL_CALL Thesaurus::makeUpperCase(const OUString& aTerm, CharClass * pCC)
 {
-        if (pCC)
-              return pCC->toUpper_rtl(aTerm, 0, aTerm.getLength());
-        return aTerm;
+    if (pCC)
+        return pCC->toUpper_rtl(aTerm, 0, aTerm.getLength());
+    return aTerm;
 }
 
 
 OUString SAL_CALL Thesaurus::makeInitCap(const OUString& aTerm, CharClass * pCC)
 {
-        sal_Int32 tlen = aTerm.getLength();
-        if ((pCC) && (tlen)) {
-              OUString bTemp = aTerm.copy(0,1);
-              if (tlen > 1)
-                   return ( pCC->toUpper_rtl(bTemp, 0, 1)
-                             + pCC->toLower_rtl(aTerm,1,(tlen-1)) );
+    sal_Int32 tlen = aTerm.getLength();
+    if ((pCC) && (tlen))
+    {
+        OUString bTemp = aTerm.copy(0,1);
+        if (tlen > 1)
+        {
+            return ( pCC->toUpper_rtl(bTemp, 0, 1)
+                     + pCC->toLower_rtl(aTerm,1,(tlen-1)) );
+        }
 
-          return pCC->toUpper_rtl(bTemp, 0, 1);
+        return pCC->toUpper_rtl(bTemp, 0, 1);
     }
-        return aTerm;
+    return aTerm;
 }
 
 
 
-void SAL_CALL
-    Thesaurus::dispose()
+void SAL_CALL Thesaurus::dispose()
         throw(RuntimeException)
 {
     MutexGuard  aGuard( GetLinguMutex() );
@@ -673,8 +687,7 @@ void SAL_CALL
 }
 
 
-void SAL_CALL
-    Thesaurus::addEventListener( const Reference< XEventListener >& rxListener )
+void SAL_CALL Thesaurus::addEventListener( const Reference< XEventListener >& rxListener )
         throw(RuntimeException)
 {
     MutexGuard  aGuard( GetLinguMutex() );
@@ -684,8 +697,7 @@ void SAL_CALL
 }
 
 
-void SAL_CALL
-    Thesaurus::removeEventListener( const Reference< XEventListener >& rxListener )
+void SAL_CALL Thesaurus::removeEventListener( const Reference< XEventListener >& rxListener )
         throw(RuntimeException)
 {
     MutexGuard  aGuard( GetLinguMutex() );
diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.hxx b/lingucomponent/source/thesaurus/libnth/nthesimp.hxx
old mode 100644
new mode 100755
index 94bbb6fb3ea6..e6d447879701
--- a/lingucomponent/source/thesaurus/libnth/nthesimp.hxx
+++ b/lingucomponent/source/thesaurus/libnth/nthesimp.hxx
@@ -116,55 +116,27 @@ public:
     virtual ~Thesaurus();
 
     // XSupportedLocales (for XThesaurus)
-    virtual Sequence< Locale > SAL_CALL
-        getLocales()
-            throw(RuntimeException);
-    virtual sal_Bool SAL_CALL
-        hasLocale( const Locale& rLocale )
-            throw(RuntimeException);
+    virtual Sequence< Locale > SAL_CALL getLocales() throw(RuntimeException);
+    virtual sal_Bool SAL_CALL hasLocale( const Locale& rLocale ) throw(RuntimeException);
 
     // XThesaurus
-  virtual Sequence< Reference < ::com::sun::star::linguistic2::XMeaning > > SAL_CALL
-        queryMeanings( const OUString& rTerm, const Locale& rLocale,
-                const PropertyValues& rProperties )
-            throw(IllegalArgumentException,
-                  RuntimeException);
+    virtual Sequence< Reference < ::com::sun::star::linguistic2::XMeaning > > SAL_CALL queryMeanings( const OUString& rTerm, const Locale& rLocale, const PropertyValues& rProperties ) throw(IllegalArgumentException, RuntimeException);
 
     // XServiceDisplayName
-    virtual OUString SAL_CALL
-        getServiceDisplayName( const Locale& rLocale )
-            throw(RuntimeException);
+    virtual OUString SAL_CALL getServiceDisplayName( const Locale& rLocale ) throw(RuntimeException);
 
     // XInitialization
-    virtual void SAL_CALL
-        initialize( const Sequence< Any >& rArguments )
-            throw(Exception, RuntimeException);
+    virtual void SAL_CALL initialize( const Sequence< Any >& rArguments ) throw(Exception, RuntimeException);
 
     // XComponent
-    virtual void SAL_CALL
-        dispose()
-            throw(RuntimeException);
-    virtual void SAL_CALL
-        addEventListener( const Reference< XEventListener >& rxListener )
-            throw(RuntimeException);
-    virtual void SAL_CALL
-        removeEventListener( const Reference< XEventListener >& rxListener )
-            throw(RuntimeException);
-
-    ////////////////////////////////////////////////////////////
-    // Service specific part
-    //
+    virtual void SAL_CALL dispose() throw(RuntimeException);
+    virtual void SAL_CALL addEventListener( const Reference< XEventListener >& rxListener ) throw(RuntimeException);
+    virtual void SAL_CALL removeEventListener( const Reference< XEventListener >& rxListener ) throw(RuntimeException);
 
     // XServiceInfo
-    virtual OUString SAL_CALL
-        getImplementationName()
-            throw(RuntimeException);
-    virtual sal_Bool SAL_CALL
-        supportsService( const OUString& rServiceName )
-            throw(RuntimeException);
-    virtual Sequence< OUString > SAL_CALL
-        getSupportedServiceNames()
-            throw(RuntimeException);
+    virtual OUString SAL_CALL getImplementationName() throw(RuntimeException);
+    virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw(RuntimeException);
+    virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(RuntimeException);
 
 
     static inline OUString
@@ -183,8 +155,7 @@ private:
     static ::com::sun::star::uno::Reference<
         ::com::sun::star::linguistic2::XSpellChecker1 > xSpell;
 */
-    static ::com::sun::star::uno::Reference<
-        ::com::sun::star::linguistic2::XLinguServiceManager > GetLngSvcMgr();
+    static ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XLinguServiceManager > GetLngSvcMgr();
 
 };
 
-- 
cgit 


From cbe34bff4881d62a8026c96aa26723989490d508 Mon Sep 17 00:00:00 2001
From: "Thomas Lange [tl]" 
Date: Mon, 26 Jul 2010 13:11:26 +0200
Subject: cws tl82: #i106993# thesaurus code clean-up

---
 cui/source/dialogs/thesdlg.cxx | 37 ++++---------------------------------
 1 file changed, 4 insertions(+), 33 deletions(-)

diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx
index bf617b126747..f6523676c306 100755
--- a/cui/source/dialogs/thesdlg.cxx
+++ b/cui/source/dialogs/thesdlg.cxx
@@ -57,6 +57,7 @@
 #include 
 #include 
 #include 
+#include 
 
 
 #include 
@@ -73,36 +74,6 @@ using ::rtl::OUString;
 #define A2S(x)          String::CreateFromAscii( x )
 
 
-
-// GetReplaceEditString -------------------------------
-
-static void GetReplaceEditString( String &rText )
-{
-    // The strings returned by the thesaurus saometimes have some
-    // explanation text put in between '(' and ')' or a trailing '*'.
-    // These parts should not be put in the ReplaceEdit Text that may get
-    // inserted into the document. Thus we strip them from the text.
-
-    xub_StrLen nPos = rText.Search( sal_Unicode('(') );
-    while (STRING_NOTFOUND != nPos)
-    {
-        xub_StrLen nEnd = rText.Search( sal_Unicode(')'), nPos );
-        if (STRING_NOTFOUND != nEnd)
-            rText.Erase( nPos, nEnd-nPos+1 );
-        else
-            break;
-        nPos = rText.Search( sal_Unicode('(') );
-    }
-
-    nPos = rText.Search( sal_Unicode('*') );
-    if (STRING_NOTFOUND != nPos)
-        rText.Erase( nPos );
-
-    // remove any possible remaining ' ' that may confuse the thesaurus
-    // when it gets called with the text
-    rText.EraseLeadingAndTrailingChars( sal_Unicode(' ') );
-}
-
 // class LookUpComboBox_Impl --------------------------------------------------
 
 LookUpComboBox_Impl::LookUpComboBox_Impl(
@@ -454,7 +425,7 @@ IMPL_LINK( SvxThesaurusDialog_Impl, WordSelectHdl_Impl, ComboBox *, pBox )
     {
         USHORT nPos = pBox->GetSelectEntryPos();
         String aStr( pBox->GetEntry( nPos ) );
-        GetReplaceEditString( aStr );
+        aStr = linguistic::GetThesaurusReplaceText( aStr );
         aWordCB.SetText( aStr );
         LookUp_Impl();
     }
@@ -473,7 +444,7 @@ IMPL_LINK( SvxThesaurusDialog_Impl, AlternativesSelectHdl_Impl, SvxCheckListBox
         if (!pData->IsHeader())
         {
             aStr = pData->GetText();
-            GetReplaceEditString( aStr );
+            aStr = linguistic::GetThesaurusReplaceText( aStr );
         }
         aReplaceEdit.SetText( aStr );
     }
@@ -491,7 +462,7 @@ IMPL_LINK( SvxThesaurusDialog_Impl, AlternativesDoubleClickHdl_Impl, SvxCheckLis
         if (!pData->IsHeader())
         {
             aStr = pData->GetText();
-            GetReplaceEditString( aStr );
+            aStr = linguistic::GetThesaurusReplaceText( aStr );
         }
 
         aWordCB.SetText( aStr );
-- 
cgit 


From c8852505f8bb9d94214250bf398c5c232dce8e43 Mon Sep 17 00:00:00 2001
From: Andreas Bregas 
Date: Fri, 6 Aug 2010 09:35:51 +0200
Subject: mib18: #163121# Declare Rework

---
 basctl/source/basicide/baside2.cxx  |  2 +-
 basctl/source/basicide/basobj2.cxx  | 18 ++++++++++++++----
 basctl/source/basicide/macrodlg.cxx | 16 ++++++++++------
 3 files changed, 25 insertions(+), 11 deletions(-)

diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 9f97e1766c3b..d0a8ca1a6ddb 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -365,7 +365,7 @@ BOOL ModulWindow::BasicExecute()
                         break;
                     }
                 }
-                else if  ( !pMethod || ( nStart < nCurMethodStart ) )
+                else if  ( !pMethod || ( nStart < nCurMethodStart && !pM->IsHidden() ) )
                 {
                     pMethod = pM;
                     nCurMethodStart = nStart;
diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx
index 3604866b4202..9604a8bd9933 100644
--- a/basctl/source/basicide/basobj2.cxx
+++ b/basctl/source/basicide/basobj2.cxx
@@ -364,13 +364,23 @@ Sequence< ::rtl::OUString > GetMethodNames( const ScriptDocument& rDocument, con
         SbModuleRef xModule = new SbModule( rModName );
         xModule->SetSource32( aOUSource );
         USHORT nCount = xModule->GetMethods()->Count();
-        aSeqMethods.realloc( nCount );
-
+        USHORT nRealCount = nCount;
         for ( USHORT i = 0; i < nCount; i++ )
         {
             SbMethod* pMethod = (SbMethod*)xModule->GetMethods()->Get( i );
+            if( pMethod->IsHidden() )
+                --nRealCount;
+        }
+        aSeqMethods.realloc( nRealCount );
+
+        USHORT iTarget = 0;
+        for ( USHORT i = 0 ; i < nCount; ++i )
+        {
+            SbMethod* pMethod = (SbMethod*)xModule->GetMethods()->Get( i );
+            if( pMethod->IsHidden() )
+                continue;
             DBG_ASSERT( pMethod, "Method not found! (NULL)" );
-            aSeqMethods.getArray()[ i ] = pMethod->GetName();
+            aSeqMethods.getArray()[ iTarget++ ] = pMethod->GetName();
         }
     }
 
@@ -392,7 +402,7 @@ BOOL HasMethod( const ScriptDocument& rDocument, const String& rLibName, const S
         if ( pMethods )
         {
             SbMethod* pMethod = (SbMethod*)pMethods->Find( rMethName, SbxCLASS_METHOD );
-            if ( pMethod )
+            if ( pMethod && !pMethod->IsHidden() )
                 bHasMethod = TRUE;
         }
     }
diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx
index 41a5fa488950..24bc5beacb30 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -554,11 +554,15 @@ IMPL_LINK( MacroChooser, BasicSelectHdl, SvTreeListBox *, pBox )
         // Die Macros sollen in der Reihenfolge angezeigt werden,
         // wie sie im Modul stehen.
         MacroList aMacros;
-        USHORT nMacros = pModule->GetMethods()->Count();
-        USHORT nMethod;
-        for ( nMethod = 0; nMethod  < nMacros; nMethod++ )
+        USHORT nMacroCount = pModule->GetMethods()->Count();
+        USHORT nRealMacroCount = 0;
+        USHORT iMeth;
+        for ( iMeth = 0; iMeth  < nMacroCount; iMeth++ )
         {
-            SbMethod* pMethod = (SbMethod*)pModule->GetMethods()->Get( nMethod );
+            SbMethod* pMethod = (SbMethod*)pModule->GetMethods()->Get( iMeth );
+            if( pMethod->IsHidden() )
+                continue;
+            ++nRealMacroCount;
             DBG_ASSERT( pMethod, "Methode nicht gefunden! (NULL)" );
             ULONG nPos = LIST_APPEND;
             // Eventuell weiter vorne ?
@@ -580,8 +584,8 @@ IMPL_LINK( MacroChooser, BasicSelectHdl, SvTreeListBox *, pBox )
         }
 
         aMacroBox.SetUpdateMode( FALSE );
-        for ( nMethod = 0; nMethod < nMacros; nMethod++ )
-            aMacroBox.InsertEntry( aMacros.GetObject( nMethod )->GetName() );
+        for ( iMeth = 0; iMeth < nRealMacroCount; iMeth++ )
+            aMacroBox.InsertEntry( aMacros.GetObject( iMeth )->GetName() );
         aMacroBox.SetUpdateMode( TRUE );
 
         if ( aMacroBox.GetEntryCount() )
-- 
cgit 


From adb0c9fe06f0a9b8c871df5e45303c6414106107 Mon Sep 17 00:00:00 2001
From: "Thomas Lange [tl]" 
Date: Fri, 6 Aug 2010 09:51:22 +0200
Subject: cws tl82: type fixed

---
 lingucomponent/source/spellcheck/spell/sspellimp.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
index 551929864b55..b8b0fe7a13cd 100755
--- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx
+++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
@@ -461,7 +461,7 @@ Reference< XSpellAlternatives >
                     OUString *pStr = aStr.getArray();
                     for (int ii=0; ii < count; ++ii)
                     {
-                        OUString cvtwrd(suglst[ii],strlen(suglst[ii]),aEnc);
+                        OUString cvtwrd(suglst[ii],strlen(suglst[ii]),eEnc);
                         pStr[numsug + ii] = cvtwrd;
                     }
                     pMS->free_list(&suglst, count);
-- 
cgit 


From f343838dbbae63d6040706c078e96efc4a50661a Mon Sep 17 00:00:00 2001
From: "Thomas Lange [tl]" 
Date: Mon, 9 Aug 2010 11:35:18 +0200
Subject: cws tl82: #i113293# sspellimp.cxx fixed

---
 .../source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx |  2 +-
 lingucomponent/source/spellcheck/spell/sspellimp.cxx    | 17 +++++++++--------
 lingucomponent/source/thesaurus/libnth/nthesimp.cxx     |  2 ++
 3 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
index 43c22d0b84a4..730b350b31aa 100755
--- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
+++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
@@ -46,8 +46,8 @@
 
 #include 
 #include 
-
 #include 
+#include 
 
 #include 
 #include 
diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
index b8b0fe7a13cd..832a1349c61e 100755
--- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx
+++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
@@ -51,6 +51,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -334,16 +335,16 @@ INT16 SpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rLocal
                 eEnc = aDEncs[i];
             }
 
-            // we don't want to work with a default text encoding since following incorrect
-            // results may occur only for specific text and thus may be hard to notice.
-            // Thus better always make a clean exit here if the text encoding is in question.
-            // Hopefully something not working at all will raise proper attention quickly. ;-)
-            DBG_ASSERT( eEnc != RTL_TEXTENCODING_DONTKNOW, "failed to get text encoding! (maybe incorrect encoding string in file)" );
-            if (eEnc == RTL_TEXTENCODING_DONTKNOW)
-                return -1;
-
             if (pMS)
             {
+                // we don't want to work with a default text encoding since following incorrect
+                // results may occur only for specific text and thus may be hard to notice.
+                // Thus better always make a clean exit here if the text encoding is in question.
+                // Hopefully something not working at all will raise proper attention quickly. ;-)
+                DBG_ASSERT( eEnc != RTL_TEXTENCODING_DONTKNOW, "failed to get text encoding! (maybe incorrect encoding string in file)" );
+                if (eEnc == RTL_TEXTENCODING_DONTKNOW)
+                    return -1;
+
                 OString aWrd(OU2ENC(nWord,eEnc));
                 int rVal = pMS->spell((char*)aWrd.getStr());
                 if (rVal != 1)
diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
index 857381b2c811..9e82f557ba6b 100755
--- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
+++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
@@ -41,6 +41,8 @@
 
 #include 
 #include 
+#include 
+
 #include "nthesimp.hxx"
 #include 
 #include 
-- 
cgit 


From ed2a220f5401b0cc315c43e5da04362e1095a173 Mon Sep 17 00:00:00 2001
From: Bjoern Michaelsen 
Date: Mon, 9 Aug 2010 15:01:40 +0200
Subject: oooimprovement6: #i100159# catching the OnLogRotate thread in a clean
 fashion

---
 .../source/oooimprovement/onlogrotate_job.cxx      | 43 +++++++++++++++++++---
 1 file changed, 38 insertions(+), 5 deletions(-)

diff --git a/extensions/source/oooimprovement/onlogrotate_job.cxx b/extensions/source/oooimprovement/onlogrotate_job.cxx
index a92044b87d7e..3007ada42aba 100644
--- a/extensions/source/oooimprovement/onlogrotate_job.cxx
+++ b/extensions/source/oooimprovement/onlogrotate_job.cxx
@@ -35,15 +35,21 @@
 #include "soapsender.hxx"
 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
+#include 
+#include 
 
 
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::task;
 using namespace ::com::sun::star::uno;
+using ::com::sun::star::frame::XTerminateListener;
+using ::com::sun::star::frame::XDesktop;
 using ::com::sun::star::ucb::XSimpleFileAccess;
 using ::rtl::OUString;
 using ::std::vector;
@@ -102,7 +108,8 @@ namespace
         public:
             OnLogRotateThread(Reference sf);
             virtual void SAL_CALL run();
-            void disposing();
+            OnLogRotateThread* disposing();
+
         private:
             Reference m_ServiceFactory;
             ::osl::Mutex m_ServiceFactoryMutex;
@@ -135,11 +142,35 @@ namespace
         }
     }
 
-    void OnLogRotateThread::disposing()
+    OnLogRotateThread* OnLogRotateThread::disposing()
     {
         ::osl::Guard< ::osl::Mutex> service_factory_guard(m_ServiceFactoryMutex);
         m_ServiceFactory.clear();
+        return this;
     }
+
+    class OnLogRotateThreadWatcher : public ::cppu::WeakImplHelper1
+    {
+        public:
+            OnLogRotateThreadWatcher(Reference sf)
+                : m_Thread(new OnLogRotateThread(sf))
+            {
+                m_Thread->create();
+            }
+            virtual ~OnLogRotateThreadWatcher()
+                { m_Thread->disposing()->terminate(); };
+
+            // XTerminateListener
+            virtual void SAL_CALL queryTermination(const EventObject&) throw(RuntimeException)
+                { };
+            virtual void SAL_CALL notifyTermination(const EventObject&) throw(RuntimeException)
+                { m_Thread->disposing()->terminate(); };
+            // XEventListener
+            virtual void SAL_CALL disposing(const EventObject&) throw(RuntimeException)
+                { m_Thread->disposing()->terminate(); };
+        private:
+            ::std::auto_ptr m_Thread;
+    };
 }
 
 namespace oooimprovement
@@ -163,9 +194,11 @@ namespace oooimprovement
         const Reference& listener)
         throw(RuntimeException)
     {
-        OnLogRotateThread* thread = new OnLogRotateThread(m_ServiceFactory);
-        thread->create();
-
+        Reference xDesktop(
+            m_ServiceFactory->createInstance(OUString::createFromAscii("com.sun.star.frame.Desktop")),
+            UNO_QUERY);
+        if(xDesktop.is())
+            xDesktop->addTerminateListener(Reference(new OnLogRotateThreadWatcher(m_ServiceFactory)));
         Any result;
         listener->jobFinished(Reference(this), result);
     }
-- 
cgit 


From bac4d759bdcf17fd4438024367ca2bc2bc982011 Mon Sep 17 00:00:00 2001
From: Bjoern Michaelsen 
Date: Wed, 11 Aug 2010 08:29:50 +0200
Subject: oooimprovement6: #i98561# clicking on show data closes the modal
 dialog

---
 cui/source/options/optimprove2.cxx | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/cui/source/options/optimprove2.cxx b/cui/source/options/optimprove2.cxx
index 29ef718a6c74..074897c3df29 100644
--- a/cui/source/options/optimprove2.cxx
+++ b/cui/source/options/optimprove2.cxx
@@ -153,7 +153,10 @@ IMPL_LINK( SvxImprovementOptionsPage, HandleShowData, PushButton*, EMPTYARG )
         uno::Reference< lang::XComponent > xDoc = ::comphelper::SynchronousDispatch::dispatch(
             xDesktop, sLogFile, C2S("_default"), 0, aArgs );
         if ( xDoc.is() )
+        {
+            dynamic_cast(GetParent())->EndDialog( RET_CANCEL );
             return 1;
+        }
     }
 
     return 0;
-- 
cgit 


From 00b6e5da07f6fb27d244a68832b39bafbaccea45 Mon Sep 17 00:00:00 2001
From: Bjoern Michaelsen 
Date: Wed, 11 Aug 2010 09:47:56 +0200
Subject: oooimprovement6: #i97340# disable show data button when no file
 exists

---
 cui/source/options/optimprove2.cxx | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/cui/source/options/optimprove2.cxx b/cui/source/options/optimprove2.cxx
index 074897c3df29..841fbc1d3fb1 100644
--- a/cui/source/options/optimprove2.cxx
+++ b/cui/source/options/optimprove2.cxx
@@ -52,6 +52,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #define C2S(s)  ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(s))
 
@@ -61,6 +62,18 @@ namespace uno   = ::com::sun::star::uno;
 namespace util  = ::com::sun::star::util;
 using namespace com::sun::star::system;
 
+
+namespace
+{
+    bool lcl_doesLogfileExist(const ::rtl::OUString& sLogPath)
+    {
+        ::rtl::OUString sLogFile( sLogPath );
+        sLogFile += C2S("/Current.csv");
+        ::osl::File aLogFile(sLogFile);
+        return aLogFile.open(osl_File_OpenFlag_Read) == ::osl::FileBase::E_None;
+    }
+}
+
 // class SvxEmptyPage ----------------------------------------------------
 
 SvxEmptyPage::SvxEmptyPage( Window* pParent ) :
@@ -262,11 +275,13 @@ void SvxImprovementOptionsPage::Reset( const SfxItemSet& /*rSet*/ )
                 if ( xSubst.is() )
                     sPath = xSubst->substituteVariables( sPath, sal_False );
                 m_sLogPath = sPath;
+                m_aShowDataPB.Enable(lcl_doesLogfileExist(m_sLogPath));
             }
         }
     }
     catch( uno::Exception& )
     {
+        m_aShowDataPB.Enable(false);
     }
 }
 
-- 
cgit 


From 6916ec405e20a62bccc5a11f515c932e7e5cd968 Mon Sep 17 00:00:00 2001
From: "Thomas Lange [tl]" 
Date: Wed, 18 Aug 2010 13:50:02 +0200
Subject: cws sw33bf08: #i113867# removing en-US dictionaries from Ukrainian
 language pack

---
 setup_native/source/packinfo/spellchecker_selection.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/setup_native/source/packinfo/spellchecker_selection.txt b/setup_native/source/packinfo/spellchecker_selection.txt
index 8d5cb0fc83b8..1ca0f231bfdc 100644
--- a/setup_native/source/packinfo/spellchecker_selection.txt
+++ b/setup_native/source/packinfo/spellchecker_selection.txt
@@ -44,6 +44,7 @@ sr = "sr,en-US"
 sh = "sr,en-US"
 sw = "sw,en-US"
 th = "th,en-US"
+uk = "ru"
 vi = "vi,en-US,fr"
 zh-TW = "EMPTY,en-US"
 zh-CN = "EMPTY,en-US"
-- 
cgit 


From cb9da85e07300b35a99fd6fe4b3d702f987d1582 Mon Sep 17 00:00:00 2001
From: "Thomas Lange [tl]" 
Date: Wed, 18 Aug 2010 13:53:28 +0200
Subject: cws sw33bf08: #i113867# removing en-US dictionaries from Ukrainian
 language pack

---
 setup_native/source/packinfo/spellchecker_selection.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/setup_native/source/packinfo/spellchecker_selection.txt b/setup_native/source/packinfo/spellchecker_selection.txt
index 1ca0f231bfdc..5853a97b141e 100644
--- a/setup_native/source/packinfo/spellchecker_selection.txt
+++ b/setup_native/source/packinfo/spellchecker_selection.txt
@@ -44,7 +44,7 @@ sr = "sr,en-US"
 sh = "sr,en-US"
 sw = "sw,en-US"
 th = "th,en-US"
-uk = "ru"
+uk = "ru,en-US"
 vi = "vi,en-US,fr"
 zh-TW = "EMPTY,en-US"
 zh-CN = "EMPTY,en-US"
-- 
cgit 


From 7fab09514c2975d9d936c840889e3dd2938bccad Mon Sep 17 00:00:00 2001
From: "Philipp Lohmann [pl]" 
Date: Tue, 24 Aug 2010 11:00:05 +0200
Subject: ooo33gsl07: #i114002# add missing license headers

---
 extensions/source/plugin/unx/npnapi.cxx | 31 +++++++++++++++++++++++++------
 extensions/source/plugin/unx/nppapi.cxx | 31 +++++++++++++++++++++++++------
 2 files changed, 50 insertions(+), 12 deletions(-)

diff --git a/extensions/source/plugin/unx/npnapi.cxx b/extensions/source/plugin/unx/npnapi.cxx
index 003b4d0943a5..4a88577c5b71 100644
--- a/extensions/source/plugin/unx/npnapi.cxx
+++ b/extensions/source/plugin/unx/npnapi.cxx
@@ -1,10 +1,29 @@
 /*************************************************************************
-
-      Source Code Control System - Header
-
-      $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/extensions/source/plugin/unx/npnapi.cxx,v 1.11 2008-01-14 14:53:25 ihi Exp $
-
-*************************************************************************/
+ *
+ * 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
+ * 
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
 
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_extensions.hxx"
diff --git a/extensions/source/plugin/unx/nppapi.cxx b/extensions/source/plugin/unx/nppapi.cxx
index 6dc1b7a30407..5e5c2dba1cf5 100644
--- a/extensions/source/plugin/unx/nppapi.cxx
+++ b/extensions/source/plugin/unx/nppapi.cxx
@@ -1,10 +1,29 @@
 /*************************************************************************
-
-      Source Code Control System - Header
-
-      $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/extensions/source/plugin/unx/nppapi.cxx,v 1.7 2008-01-14 14:53:38 ihi Exp $
-
-*************************************************************************/
+ *
+ * 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
+ * 
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
 
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_extensions.hxx"
-- 
cgit 


From 96a48f7977616c3484d590c2bc3f70298af0cc94 Mon Sep 17 00:00:00 2001
From: "Frank Schoenheit [fs]" 
Date: Wed, 25 Aug 2010 16:14:14 +0200
Subject: dba33h: #i114022# properly handle new/empty images

---
 forms/source/component/ImageControl.cxx | 12 +++++++++---
 forms/source/component/imgprod.cxx      |  3 +++
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx
index f74e82135708..13155d54cf48 100644
--- a/forms/source/component/ImageControl.cxx
+++ b/forms/source/component/ImageControl.cxx
@@ -523,7 +523,13 @@ Any OImageControlModel::translateDbColumnToControlValue()
 {
     switch ( lcl_getImageStoreType( getFieldType() ) )
     {
-    case ImageStoreBinary:  return makeAny( m_xColumn->getBinaryStream() );
+    case ImageStoreBinary:
+    {
+        Reference< XInputStream > xImageStream( m_xColumn->getBinaryStream() );
+        if ( m_xColumn->wasNull() )
+            xImageStream.clear();
+        return makeAny( xImageStream );
+    }
     case ImageStoreLink:
     {
         ::rtl::OUString sImageLink( m_xColumn->getString() );
@@ -634,10 +640,10 @@ void SAL_CALL OImageControlModel::startProduction(  ) throw (RuntimeException)
 //------------------------------------------------------------------------------
 IMPL_LINK( OImageControlModel, OnImageImportDone, ::Graphic*, i_pGraphic )
 {
-    ENSURE_OR_RETURN( i_pGraphic, "OImageControlModel::OnImageImportDone: illegal graphic!", 0L );
+    const Reference< XGraphic > xGraphic( i_pGraphic != NULL ? Image( i_pGraphic->GetBitmapEx() ).GetXGraphic() : NULL );
     setPropertyValue(
         ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Graphic" ) ),
-        makeAny( Image( i_pGraphic->GetBitmapEx() ).GetXGraphic() )
+        makeAny( xGraphic )
     );
     return 1L;
 }
diff --git a/forms/source/component/imgprod.cxx b/forms/source/component/imgprod.cxx
index 7e0293be334e..07abd703281d 100644
--- a/forms/source/component/imgprod.cxx
+++ b/forms/source/component/imgprod.cxx
@@ -351,6 +351,9 @@ void ImageProducer::startProduction() throw(::com::sun::star::uno::RuntimeExcept
             // delete interfaces in temporary list
             for( pCons = aTmp.First(); pCons; pCons = aTmp.Next() )
                 delete (::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons;
+
+            if ( maDoneHdl.IsSet() )
+                maDoneHdl.Call( NULL );
         }
     }
 }
-- 
cgit 


From 93f90c4e7d40e142b57e6c8c08dc080ccf4b478e Mon Sep 17 00:00:00 2001
From: "Frank Schoenheit [fs]" 
Date: Thu, 26 Aug 2010 12:02:20 +0200
Subject: dba33h: #i112659# ensure bound image controls never embed their image
 in the surrounding document

---
 forms/source/component/ImageControl.cxx | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx
index 13155d54cf48..b433dec92d70 100644
--- a/forms/source/component/ImageControl.cxx
+++ b/forms/source/component/ImageControl.cxx
@@ -800,6 +800,11 @@ 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
+            // 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# / 2010-08-26 / frank.schoenheit@oracle.com
+            bIsLink |= bHasField;
             if ( !bIsLink )
             {
                 Graphic aGraphic;
-- 
cgit 


From e4a1230f6b6d387e87ff29ebd743609701e11c6f Mon Sep 17 00:00:00 2001
From: "Frank Schoenheit [fs]" 
Date: Thu, 26 Aug 2010 15:24:03 +0200
Subject: dba33h: #i113991# handle ImageURL and Graphic properties ourselves,
 do not leave this to the aggregate. Otherwise, both the aggregate and we try
 to sync those, which is good for some problems ...

---
 forms/source/component/FormComponent.cxx | 104 ++++++++++-------------------
 forms/source/component/ImageControl.cxx  | 109 ++++++++++++++++++-------------
 forms/source/component/ImageControl.hxx  |  14 ++--
 forms/source/inc/FormComponent.hxx       |  22 +++++++
 forms/source/inc/frm_strings.hxx         |   1 +
 forms/source/inc/property.hrc            |   2 +-
 forms/source/misc/property.cxx           |   1 +
 7 files changed, 134 insertions(+), 119 deletions(-)

diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx
index 148e4c9aa298..f9d3ffab9709 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -507,14 +507,12 @@ DBG_NAME(OControlModel)
 //------------------------------------------------------------------
 Sequence SAL_CALL OControlModel::getImplementationId() throw(RuntimeException)
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getImplementationId" );
     return OImplementationIds::getImplementationId(getTypes());
 }
 
 //------------------------------------------------------------------
 Sequence SAL_CALL OControlModel::getTypes() throw(RuntimeException)
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getTypes" );
     TypeBag aTypes( _getTypes() );
 
     Reference< XTypeProvider > xProv;
@@ -527,7 +525,6 @@ Sequence SAL_CALL OControlModel::getTypes() throw(RuntimeException)
 //------------------------------------------------------------------------------
 Sequence OControlModel::_getTypes()
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::_getTypes" );
     return TypeBag( OComponentHelper::getTypes(),
         OPropertySetAggregationHelper::getTypes(),
         OControlModel_BASE::getTypes()
@@ -537,7 +534,6 @@ Sequence OControlModel::_getTypes()
 //------------------------------------------------------------------
 Any SAL_CALL OControlModel::queryAggregation(const Type& _rType) throw (RuntimeException)
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::queryAggregation" );
     // base class 1
     Any aReturn(OComponentHelper::queryAggregation(_rType));
 
@@ -561,7 +557,6 @@ Any SAL_CALL OControlModel::queryAggregation(const Type& _rType) throw (RuntimeE
 //------------------------------------------------------------------------------
 void OControlModel::readHelpTextCompatibly(const staruno::Reference< stario::XObjectInputStream >& _rxInStream)
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::readHelpTextCompatibly" );
     ::rtl::OUString sHelpText;
     ::comphelper::operator>>( _rxInStream, sHelpText);
     try
@@ -578,7 +573,6 @@ void OControlModel::readHelpTextCompatibly(const staruno::Reference< stario::XOb
 //------------------------------------------------------------------------------
 void OControlModel::writeHelpTextCompatibly(const staruno::Reference< stario::XObjectOutputStream >& _rxOutStream)
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::writeHelpTextCompatibly" );
     ::rtl::OUString sHelpText;
     try
     {
@@ -609,7 +603,6 @@ OControlModel::OControlModel(
         // the native look is ugly ....
         // #i37342# / 2004-11-19 / frank.schoenheit@sun.com
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::OControlModel" );
     DBG_CTOR(OControlModel, NULL);
     if (_rUnoControlModelTypeName.getLength())  // the is a model we have to aggregate
     {
@@ -651,7 +644,6 @@ OControlModel::OControlModel( const OControlModel* _pOriginal, const Reference<
     ,m_nTabIndex( FRM_DEFAULT_TABINDEX )
     ,m_nClassId( FormComponentType::CONTROL )
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::OControlModel(copy)" );
     DBG_CTOR( OControlModel, NULL );
     DBG_ASSERT( _pOriginal, "OControlModel::OControlModel: invalid original!" );
 
@@ -696,14 +688,12 @@ OControlModel::~OControlModel()
 //------------------------------------------------------------------
 void OControlModel::clonedFrom( const OControlModel* /*_pOriginal*/ )
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::clonedFrom" );
     // nothing to do in this base class
 }
 
 //------------------------------------------------------------------------------
 void OControlModel::doResetDelegator()
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::doResetDelegator" );
     if (m_xAggregate.is())
         m_xAggregate->setDelegator(NULL);
 }
@@ -711,7 +701,6 @@ void OControlModel::doResetDelegator()
 //------------------------------------------------------------------------------
 void OControlModel::doSetDelegator()
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::doSetDelegator" );
     increment(m_refCount);
     if (m_xAggregate.is())
     {
@@ -724,14 +713,12 @@ void OControlModel::doSetDelegator()
 //------------------------------------------------------------------------------
 InterfaceRef SAL_CALL OControlModel::getParent() throw(RuntimeException)
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getParent" );
     return m_xParent;
 }
 
 //------------------------------------------------------------------------------
 void SAL_CALL OControlModel::setParent(const InterfaceRef& _rxParent) throw(com::sun::star::lang::NoSupportException, RuntimeException)
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::setParent" );
     osl::MutexGuard aGuard(m_aMutex);
 
     Reference xComp(m_xParent, UNO_QUERY);
@@ -749,7 +736,6 @@ void SAL_CALL OControlModel::setParent(const InterfaceRef& _rxParent) throw(com:
 //------------------------------------------------------------------------------
 ::rtl::OUString SAL_CALL OControlModel::getName() throw(RuntimeException)
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getName" );
     ::rtl::OUString aReturn;
     OPropertySetHelper::getFastPropertyValue(PROPERTY_ID_NAME) >>= aReturn;
     return aReturn;
@@ -758,7 +744,6 @@ void SAL_CALL OControlModel::setParent(const InterfaceRef& _rxParent) throw(com:
 //------------------------------------------------------------------------------
 void SAL_CALL OControlModel::setName(const ::rtl::OUString& _rName) throw(RuntimeException)
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::setName" );
         setFastPropertyValue(PROPERTY_ID_NAME, makeAny(_rName));
 }
 
@@ -766,7 +751,6 @@ void SAL_CALL OControlModel::setName(const ::rtl::OUString& _rName) throw(Runtim
 //------------------------------------------------------------------------------
 sal_Bool SAL_CALL OControlModel::supportsService(const rtl::OUString& _rServiceName) throw ( RuntimeException)
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::supportsService" );
     Sequence aSupported = getSupportedServiceNames();
     const rtl::OUString* pSupported = aSupported.getConstArray();
     for (sal_Int32 i=0; i OControlModel::getAggregateServiceNames()
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getAggregateServiceNames" );
     Sequence< ::rtl::OUString > aAggServices;
     Reference< XServiceInfo > xInfo;
     if ( query_aggregation( m_xAggregate, xInfo ) )
@@ -789,7 +772,6 @@ Sequence< ::rtl::OUString > OControlModel::getAggregateServiceNames()
 //------------------------------------------------------------------------------
 Sequence SAL_CALL OControlModel::getSupportedServiceNames() throw(RuntimeException)
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getSupportedServiceNames" );
     return ::comphelper::concatSequences(
         getAggregateServiceNames(),
         getSupportedServiceNames_Static()
@@ -799,7 +781,6 @@ Sequence SAL_CALL OControlModel::getSupportedServiceNames() throw
 //------------------------------------------------------------------------------
 Sequence< ::rtl::OUString > SAL_CALL OControlModel::getSupportedServiceNames_Static() throw( RuntimeException )
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getSupportedServiceNames_Static" );
     Sequence< ::rtl::OUString > aServiceNames( 2 );
     aServiceNames[ 0 ] = FRM_SUN_FORMCOMPONENT;
     aServiceNames[ 1 ] = ::rtl::OUString::createFromAscii( "com.sun.star.form.FormControlModel" );
@@ -810,7 +791,6 @@ Sequence< ::rtl::OUString > SAL_CALL OControlModel::getSupportedServiceNames_Sta
 //------------------------------------------------------------------------------
 void SAL_CALL OControlModel::disposing(const com::sun::star::lang::EventObject& _rSource) throw (RuntimeException)
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::disposing" );
     // release the parent
     if (_rSource.Source == m_xParent)
     {
@@ -832,7 +812,6 @@ void SAL_CALL OControlModel::disposing(const com::sun::star::lang::EventObject&
 //-----------------------------------------------------------------------------
 void OControlModel::disposing()
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::disposing" );
     OPropertySetAggregationHelper::disposing();
 
     Reference xComp;
@@ -847,7 +826,6 @@ void OControlModel::disposing()
 //------------------------------------------------------------------------------
 void OControlModel::writeAggregate( const Reference< XObjectOutputStream >& _rxOutStream ) const
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::writeAggregate" );
     Reference< XPersistObject > xPersist;
     if ( query_aggregation( m_xAggregate, xPersist ) )
         xPersist->write( _rxOutStream );
@@ -856,7 +834,6 @@ void OControlModel::writeAggregate( const Reference< XObjectOutputStream >& _rxO
 //------------------------------------------------------------------------------
 void OControlModel::readAggregate( const Reference< XObjectInputStream >& _rxInStream )
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::readAggregate" );
     Reference< XPersistObject > xPersist;
     if ( query_aggregation( m_xAggregate, xPersist ) )
         xPersist->read( _rxInStream );
@@ -866,7 +843,6 @@ void OControlModel::readAggregate( const Reference< XObjectInputStream >& _rxInS
 void SAL_CALL OControlModel::write(const Reference& _rxOutStream)
                         throw(stario::IOException, RuntimeException)
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::write" );
     osl::MutexGuard aGuard(m_aMutex);
 
     // 1. Schreiben des UnoControls
@@ -912,7 +888,6 @@ void SAL_CALL OControlModel::write(const Reference&
 //------------------------------------------------------------------------------
 void OControlModel::read(const Reference& InStream) throw (::com::sun::star::io::IOException, RuntimeException)
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::read" );
     osl::MutexGuard aGuard(m_aMutex);
 
     Reference xMark(InStream, UNO_QUERY);
@@ -966,7 +941,6 @@ void OControlModel::read(const Reference& InStream)
 //------------------------------------------------------------------------------
 PropertyState OControlModel::getPropertyStateByHandle( sal_Int32 _nHandle )
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getPropertyStateByHandle" );
     // simply compare the current and the default value
     Any aCurrentValue = getPropertyDefaultByHandle( _nHandle );
     Any aDefaultValue;  getFastPropertyValue( aDefaultValue, _nHandle );
@@ -983,7 +957,6 @@ PropertyState OControlModel::getPropertyStateByHandle( sal_Int32 _nHandle )
 //------------------------------------------------------------------------------
 void OControlModel::setPropertyToDefaultByHandle( sal_Int32 _nHandle)
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::setPropertyToDefaultByHandle" );
     Any aDefault = getPropertyDefaultByHandle( _nHandle );
 
     Any aConvertedValue, aOldValue;
@@ -997,7 +970,6 @@ void OControlModel::setPropertyToDefaultByHandle( sal_Int32 _nHandle)
 //------------------------------------------------------------------------------
 Any OControlModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getPropertyDefaultByHandle" );
     Any aReturn;
     switch ( _nHandle )
     {
@@ -1030,7 +1002,6 @@ Any OControlModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const
 //------------------------------------------------------------------------------
 void OControlModel::getFastPropertyValue( Any& _rValue, sal_Int32 _nHandle ) const
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getFastPropertyValue" );
     switch ( _nHandle )
     {
         case PROPERTY_ID_NAME:
@@ -1062,7 +1033,6 @@ sal_Bool OControlModel::convertFastPropertyValue(
                         Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue)
                         throw (com::sun::star::lang::IllegalArgumentException)
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::convertFastPropertyValue" );
     sal_Bool bModified(sal_False);
     switch (_nHandle)
     {
@@ -1092,7 +1062,6 @@ sal_Bool OControlModel::convertFastPropertyValue(
 void OControlModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const Any& _rValue)
                         throw (Exception)
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::setFastPropertyValue_NoBroadcast" );
     switch (_nHandle)
     {
         case PROPERTY_ID_NAME:
@@ -1125,7 +1094,6 @@ void OControlModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const A
 //------------------------------------------------------------------------------
 void OControlModel::describeFixedProperties( Sequence< Property >& _rProps ) const
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::describeFixedProperties" );
     BEGIN_DESCRIBE_BASE_PROPERTIES( 4 )
         DECL_PROP2      (CLASSID,     sal_Int16,        READONLY, TRANSIENT);
         DECL_PROP1      (NAME,        ::rtl::OUString,  BOUND);
@@ -1137,7 +1105,6 @@ void OControlModel::describeFixedProperties( Sequence< Property >& _rProps ) con
 //------------------------------------------------------------------------------
 void OControlModel::describeAggregateProperties( Sequence< Property >& /* [out] */ _rAggregateProps ) const
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::describeAggregateProperties" );
     if ( m_xAggregateSet.is() )
     {
         Reference< XPropertySetInfo > xPSI( m_xAggregateSet->getPropertySetInfo() );
@@ -1149,14 +1116,12 @@ void OControlModel::describeAggregateProperties( Sequence< Property >& /* [out]
 //------------------------------------------------------------------------------
 ::osl::Mutex& OControlModel::getMutex()
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getMutex" );
     return m_aMutex;
 }
 
 //------------------------------------------------------------------------------
 void OControlModel::describeFixedAndAggregateProperties( Sequence< Property >& _out_rFixedProperties, Sequence< Property >& _out_rAggregateProperties ) const
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::describeFixedAndAggregateProperties" );
     describeFixedProperties( _out_rFixedProperties );
     describeAggregateProperties( _out_rAggregateProperties );
 }
@@ -1164,49 +1129,42 @@ void OControlModel::describeFixedAndAggregateProperties( Sequence< Property >& _
 //------------------------------------------------------------------------------
 Reference< XMultiPropertySet > OControlModel::getPropertiesInterface()
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getPropertiesInterface" );
     return Reference< XMultiPropertySet >( *this, UNO_QUERY );
 }
 
 //------------------------------------------------------------------------------
 Reference< XPropertySetInfo> SAL_CALL OControlModel::getPropertySetInfo() throw( RuntimeException)
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getPropertySetInfo" );
     return createPropertySetInfo( getInfoHelper() );
 }
 
 //------------------------------------------------------------------------------
 ::cppu::IPropertyArrayHelper& OControlModel::getInfoHelper()
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getInfoHelper" );
     return m_aPropertyBagHelper.getInfoHelper();
 }
 
 //--------------------------------------------------------------------
 void SAL_CALL OControlModel::addProperty( const ::rtl::OUString& _rName, ::sal_Int16 _nAttributes, const Any& _rInitialValue ) throw (PropertyExistException, IllegalTypeException, IllegalArgumentException, RuntimeException)
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::addProperty" );
     m_aPropertyBagHelper.addProperty( _rName, _nAttributes, _rInitialValue );
 }
 
 //--------------------------------------------------------------------
 void SAL_CALL OControlModel::removeProperty( const ::rtl::OUString& _rName ) throw (UnknownPropertyException, NotRemoveableException, RuntimeException)
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::removeProperty" );
     m_aPropertyBagHelper.removeProperty( _rName );
 }
 
 //--------------------------------------------------------------------
 Sequence< PropertyValue > SAL_CALL OControlModel::getPropertyValues() throw (RuntimeException)
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getPropertyValues" );
     return m_aPropertyBagHelper.getPropertyValues();
 }
 
 //--------------------------------------------------------------------
 void SAL_CALL OControlModel::setPropertyValues( const Sequence< PropertyValue >& _rProps ) throw (UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException)
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::setPropertyValues" );
     m_aPropertyBagHelper.setPropertyValues( _rProps );
 }
 
@@ -1249,7 +1207,6 @@ Any SAL_CALL OBoundControlModel::queryAggregation( const Type& _rType ) throw (R
     Any aReturn( OControlModel::queryAggregation(_rType) );
     if (!aReturn.hasValue())
     {
-        // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::queryAggregation" );
         aReturn = OBoundControlModel_BASE1::queryInterface(_rType);
 
         if ( !aReturn.hasValue() && m_bCommitable )
@@ -1426,11 +1383,20 @@ void OBoundControlModel::implInitValuePropertyListening( ) const
     }
 }
 
+//-----------------------------------------------------------------------------
+void OBoundControlModel::initOwnValueProperty( const ::rtl::OUString& i_rValuePropertyName )
+{
+    OSL_PRECOND( !m_sValuePropertyName.getLength() && -1 == m_nValuePropertyAggregateHandle,
+        "OBoundControlModel::initOwnValueProperty: value property is already initialized!" );
+    OSL_ENSURE( i_rValuePropertyName.getLength(), "OBoundControlModel::initOwnValueProperty: invalid property name!" );
+    m_sValuePropertyName = i_rValuePropertyName;
+}
+
 //-----------------------------------------------------------------------------
 void OBoundControlModel::initValueProperty( const ::rtl::OUString& _rValuePropertyName, sal_Int32 _nValuePropertyExternalHandle )
 {
     OSL_PRECOND( !m_sValuePropertyName.getLength() && -1 == m_nValuePropertyAggregateHandle,
-        "OBoundControlModel::initValueProperty: already called before!" );
+        "OBoundControlModel::initValueProperty: value property is already initialized!" );
     OSL_ENSURE( _rValuePropertyName.getLength(), "OBoundControlModel::initValueProperty: invalid property name!" );
     OSL_ENSURE( _nValuePropertyExternalHandle != -1, "OBoundControlModel::initValueProperty: invalid property handle!" );
 
@@ -1495,7 +1461,6 @@ Sequence< Type > OBoundControlModel::_getTypes()
 //-----------------------------------------------------------------------------
 void OBoundControlModel::disposing()
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::_getTypes" );
     OControlModel::disposing();
 
     ::osl::ClearableMutexGuard aGuard(m_aMutex);
@@ -1532,6 +1497,29 @@ void OBoundControlModel::disposing()
         disconnectValidator( );
 }
 
+//------------------------------------------------------------------------------
+void OBoundControlModel::onValuePropertyChange( ControlModelLock& i_rControLock )
+{
+    if ( hasExternalValueBinding() )
+    {   // the control value changed, while we have an external value binding
+        // -> forward the value to it
+        if ( m_eControlValueChangeInstigator != eExternalBinding )
+            transferControlValueToExternal( i_rControLock );
+    }
+    else if ( !m_bCommitable && m_xColumnUpdate.is() )
+    {   // the control value changed, while we are  bound to a database column,
+        // but not committable (which means changes in the control have to be reflected to
+        // the underlying database column immediately)
+        // -> forward the value to the database column
+        if ( m_eControlValueChangeInstigator != eDbColumnBinding )
+            commitControlValueToDbColumn( false );
+    }
+
+    // validate the new value
+    if ( m_bSupportsValidation )
+        recheckValidity( true );
+}
+
 //------------------------------------------------------------------------------
 void OBoundControlModel::_propertyChanged( const PropertyChangeEvent& _rEvt ) throw ( RuntimeException )
 {
@@ -1543,26 +1531,8 @@ void OBoundControlModel::_propertyChanged( const PropertyChangeEvent& _rEvt ) th
         "OBoundControlModel::_propertyChanged: where did this come from (2)?" );
 
     if ( _rEvt.PropertyName == m_sValuePropertyName )
-    {   // our control value changed
-
-        if ( hasExternalValueBinding() )
-        {   // the control value changed, while we have an external value binding
-            // -> forward the value to it
-            if ( m_eControlValueChangeInstigator != eExternalBinding )
-                transferControlValueToExternal( aLock );
-        }
-        else if ( !m_bCommitable && m_xColumnUpdate.is() )
-        {   // the control value changed, while we are  bound to a database column,
-            // but not committable (which means changes in the control have to be reflected to
-            // the underlying database column immediately)
-            // -> forward the value to the database column
-            if ( m_eControlValueChangeInstigator !=  eDbColumnBinding )
-                commitControlValueToDbColumn( false );
-        }
-
-        // validate the new value
-        if ( m_bSupportsValidation )
-            recheckValidity( true );
+    {
+        onValuePropertyChange( aLock );
     }
 }
 
@@ -1673,7 +1643,6 @@ void SAL_CALL OBoundControlModel::disposing(const com::sun::star::lang::EventObj
 //------------------------------------------------------------------------------
 StringSequence SAL_CALL OBoundControlModel::getSupportedServiceNames() throw(RuntimeException)
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::disposing" );
     return ::comphelper::concatSequences(
         getAggregateServiceNames(),
         getSupportedServiceNames_Static()
@@ -1696,7 +1665,6 @@ Sequence< ::rtl::OUString > SAL_CALL OBoundControlModel::getSupportedServiceName
 //------------------------------------------------------------------------------
 void SAL_CALL OBoundControlModel::write( const Reference& _rxOutStream ) throw(stario::IOException, RuntimeException)
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getSupportedServiceNames_Static" );
     OControlModel::write(_rxOutStream);
 
     osl::MutexGuard aGuard(m_aMutex);
@@ -1797,7 +1765,6 @@ void SAL_CALL OBoundControlModel::read( const Reference< stario::XObjectInputStr
 //------------------------------------------------------------------------------
 void OBoundControlModel::getFastPropertyValue(Any& rValue, sal_Int32 nHandle) const
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OBoundControlModel::getFastPropertyValue" );
     switch (nHandle)
     {
         case PROPERTY_ID_INPUT_REQUIRED:
@@ -1866,7 +1833,6 @@ sal_Bool OBoundControlModel::convertFastPropertyValue(
 //------------------------------------------------------------------------------
 Any OBoundControlModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const
 {
-    // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::convertFastPropertyValue" );
     Any aDefault;
     switch ( _nHandle )
     {
diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx
index b433dec92d70..6d9fad98c6ca 100644
--- a/forms/source/component/ImageControl.cxx
+++ b/forms/source/component/ImageControl.cxx
@@ -152,10 +152,12 @@ OImageControlModel::OImageControlModel(const Reference& _r
                     // use the old control name for compytibility reasons
     ,m_pImageProducer( NULL )
     ,m_bReadOnly( sal_False )
+    ,m_sImageURL()
+    ,m_xGraphic()
 {
     DBG_CTOR( OImageControlModel, NULL );
     m_nClassId = FormComponentType::IMAGECONTROL;
-    initValueProperty( PROPERTY_IMAGE_URL, PROPERTY_ID_IMAGE_URL);
+    initOwnValueProperty( PROPERTY_IMAGE_URL );
 
     implConstruct();
 }
@@ -165,22 +167,19 @@ OImageControlModel::OImageControlModel( const OImageControlModel* _pOriginal, co
     :OBoundControlModel( _pOriginal, _rxFactory )
                 // use the old control name for compytibility reasons
     ,m_pImageProducer( NULL )
+    ,m_bReadOnly( _pOriginal->m_bReadOnly )
+    ,m_sImageURL( _pOriginal->m_sImageURL )
+    ,m_xGraphic( _pOriginal->m_xGraphic )
 {
     DBG_CTOR( OImageControlModel, NULL );
     implConstruct();
-    m_bReadOnly = _pOriginal->m_bReadOnly;
 
     osl_incrementInterlockedCount( &m_refCount );
     {
         // simulate a propertyChanged event for the ImageURL
         // 2003-05-15 - #109591# - fs@openoffice.org
-        Any aImageURL;
-        getFastPropertyValue( aImageURL, PROPERTY_ID_IMAGE_URL );
-        ::rtl::OUString sImageURL;
-        aImageURL >>= sImageURL;
-
         ::osl::MutexGuard aGuard( m_aMutex );
-        impl_handleNewImageURL_lck( sImageURL, eOther );
+        impl_handleNewImageURL_lck( eOther );
     }
     osl_decrementInterlockedCount( &m_refCount );
 }
@@ -244,32 +243,20 @@ sal_Bool OImageControlModel::approveDbColumnType( sal_Int32 _nColumnType )
     return ImageStoreInvalid != lcl_getImageStoreType( _nColumnType );
 }
 
-
-//------------------------------------------------------------------------------
-void OImageControlModel::_propertyChanged( const PropertyChangeEvent& _rEvent )
-                                            throw( RuntimeException )
-{
-    if ( m_xColumnUpdate.is() )
-    {
-        OBoundControlModel::_propertyChanged( _rEvent );
-    }
-    else
-    {   // we're not bound. In this case, we have to manually care for updating the
-        // image producer, since the base class will not do this
-        ::rtl::OUString sImageURL;
-        _rEvent.NewValue >>= sImageURL;
-
-        ::osl::MutexGuard aGuard( m_aMutex );
-        impl_handleNewImageURL_lck( sImageURL, eOther );
-    }
-}
-
 //------------------------------------------------------------------------------
 void OImageControlModel::getFastPropertyValue(Any& rValue, sal_Int32 nHandle) const
 {
     switch (nHandle)
     {
-        case PROPERTY_ID_READONLY       : rValue <<= (sal_Bool)m_bReadOnly; break;
+        case PROPERTY_ID_READONLY:
+            rValue <<= (sal_Bool)m_bReadOnly;
+            break;
+        case PROPERTY_ID_IMAGE_URL:
+            rValue <<= m_sImageURL;
+            break;
+        case PROPERTY_ID_GRAPHIC:
+            rValue <<= m_xGraphic;
+            break;
         default:
             OBoundControlModel::getFastPropertyValue(rValue, nHandle);
     }
@@ -285,8 +272,24 @@ void OImageControlModel::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, con
             m_bReadOnly = getBOOL(rValue);
             break;
 
+        case PROPERTY_ID_IMAGE_URL:
+            OSL_VERIFY( rValue >>= m_sImageURL );
+            impl_handleNewImageURL_lck( eOther );
+            {
+                ControlModelLock aLock( *this );
+                    // that's a fake ... onValuePropertyChange expects to receive the only lock to our instance,
+                    // but we're already called with our mutex locked ...
+                onValuePropertyChange( aLock );
+            }
+            break;
+
+        case PROPERTY_ID_GRAPHIC:
+            OSL_VERIFY( rValue >>= m_xGraphic );
+            break;
+
         default:
             OBoundControlModel::setFastPropertyValue_NoBroadcast(nHandle, rValue);
+            break;
     }
 }
 
@@ -299,6 +302,12 @@ sal_Bool OImageControlModel::convertFastPropertyValue(Any& rConvertedValue, Any&
         case PROPERTY_ID_READONLY :
             return tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bReadOnly);
 
+        case PROPERTY_ID_IMAGE_URL:
+            return tryPropertyValue( rConvertedValue, rOldValue, rValue, m_sImageURL );
+
+        case PROPERTY_ID_GRAPHIC:
+            return tryPropertyValue( rConvertedValue, rOldValue, rValue, m_xGraphic );
+
         default:
             return OBoundControlModel::convertFastPropertyValue(rConvertedValue, rOldValue, nHandle, rValue);
     }
@@ -307,12 +316,24 @@ sal_Bool OImageControlModel::convertFastPropertyValue(Any& rConvertedValue, Any&
 //------------------------------------------------------------------------------
 void OImageControlModel::describeFixedProperties( Sequence< Property >& _rProps ) const
 {
-    BEGIN_DESCRIBE_PROPERTIES( 2, OBoundControlModel )
-        DECL_BOOL_PROP1 ( READONLY,             BOUND );
-        DECL_PROP1      ( TABINDEX, sal_Int16,  BOUND );
+    BEGIN_DESCRIBE_PROPERTIES( 4, OBoundControlModel )
+        DECL_IFACE_PROP2( GRAPHIC,   XGraphic,        BOUND, TRANSIENT );
+        DECL_PROP1      ( IMAGE_URL, ::rtl::OUString, BOUND );
+        DECL_BOOL_PROP1 ( READONLY,                   BOUND );
+        DECL_PROP1      ( TABINDEX,  sal_Int16,       BOUND );
     END_DESCRIBE_PROPERTIES();
 }
 
+//------------------------------------------------------------------------------
+void OImageControlModel::describeAggregateProperties( Sequence< Property >& /* [out] */ o_rAggregateProperties ) const
+{
+    OBoundControlModel::describeAggregateProperties( o_rAggregateProperties );
+    // remove ImageULR and Graphic properties, we "overload" them. This is because our aggregate synchronizes those
+    // two, but we have an own sychronization mechanism.
+    RemoveProperty( o_rAggregateProperties, PROPERTY_IMAGE_URL );
+    RemoveProperty( o_rAggregateProperties, PROPERTY_GRAPHIC );
+}
+
 //------------------------------------------------------------------------------
 ::rtl::OUString OImageControlModel::getServiceName() throw ( ::com::sun::star::uno::RuntimeException)
 {
@@ -411,18 +432,18 @@ sal_Bool OImageControlModel::impl_updateStreamForURL_lck( const ::rtl::OUString&
 }
 
 //------------------------------------------------------------------------------
-sal_Bool OImageControlModel::impl_handleNewImageURL_lck( const ::rtl::OUString& _rURL, ValueChangeInstigator _eInstigator )
+sal_Bool OImageControlModel::impl_handleNewImageURL_lck( ValueChangeInstigator _eInstigator )
 {
     switch ( lcl_getImageStoreType( getFieldType() ) )
     {
     case ImageStoreBinary:
-        if ( impl_updateStreamForURL_lck( _rURL, _eInstigator ) )
+        if ( impl_updateStreamForURL_lck( m_sImageURL, _eInstigator ) )
             return sal_True;
         break;
 
     case ImageStoreLink:
     {
-        ::rtl::OUString sCommitURL( _rURL );
+        ::rtl::OUString sCommitURL( m_sImageURL );
         if ( m_sDocumentURL.getLength() )
             sCommitURL = URIHelper::simpleNormalizedMakeRelative( m_sDocumentURL, sCommitURL );
         OSL_ENSURE( m_xColumnUpdate.is(), "OImageControlModel::impl_handleNewImageURL_lck: no bound field, but ImageStoreLink?!" );
@@ -435,7 +456,7 @@ sal_Bool OImageControlModel::impl_handleNewImageURL_lck( const ::rtl::OUString&
     break;
 
     case ImageStoreInvalid:
-        OSL_ENSURE( false, "OImageControlModel::impl_handleNewImageURL_lck: invalid current field type!" );
+        OSL_ENSURE( false, "OImageControlModel::impl_handleNewImageURL_lck: image storage type type!" );
         break;
     }
 
@@ -462,10 +483,7 @@ sal_Bool OImageControlModel::commitControlValueToDbColumn( bool _bPostReset )
     else
     {
         ::osl::MutexGuard aGuard(m_aMutex);
-
-        ::rtl::OUString sImageURL;
-        m_xAggregateSet->getPropertyValue( PROPERTY_IMAGE_URL ) >>= sImageURL;
-        return impl_handleNewImageURL_lck( sImageURL, eDbColumnBinding );
+        return impl_handleNewImageURL_lck( eDbColumnBinding );
     }
 
     return sal_True;
@@ -544,6 +562,12 @@ Any OImageControlModel::translateDbColumnToControlValue()
     return Any();
 }
 
+//------------------------------------------------------------------------------
+Any OImageControlModel::getControlValue( ) const
+{
+    return makeAny( m_sImageURL );
+}
+
 //------------------------------------------------------------------------------
 void OImageControlModel::doSetControlValue( const Any& _rValue )
 {
@@ -599,11 +623,6 @@ void OImageControlModel::doSetControlValue( const Any& _rValue )
 void SAL_CALL OImageControlModel::disposing()
 {
     OBoundControlModel::disposing();
-
-    {
-        ::osl::MutexGuard aGuard( m_aMutex ); // setControlValue expects this
-        setControlValue( Any(), eOther );
-    }
 }
 
 //------------------------------------------------------------------------------
diff --git a/forms/source/component/ImageControl.hxx b/forms/source/component/ImageControl.hxx
index c31216fc8aca..75bc48dd9c8e 100644
--- a/forms/source/component/ImageControl.hxx
+++ b/forms/source/component/ImageControl.hxx
@@ -33,6 +33,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -58,6 +59,9 @@ class OImageControlModel
     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageProducer>    m_xImageProducer;
     ImageProducer*                                  m_pImageProducer;
     sal_Bool                                        m_bReadOnly;
+    ::rtl::OUString                                 m_sImageURL;
+    ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic >
+                                                    m_xGraphic;
     ::rtl::OUString                                 m_sDocumentURL;
 
 protected:
@@ -86,9 +90,6 @@ public:
     // OComponentHelper
     virtual void SAL_CALL disposing();
 
-    // OPropertyChangeListener
-    virtual void _propertyChanged( const ::com::sun::star::beans::PropertyChangeEvent& ) throw(::com::sun::star::uno::RuntimeException);
-
     // XPersistObject
     virtual ::rtl::OUString SAL_CALL getServiceName() throw ( ::com::sun::star::uno::RuntimeException);
     virtual void SAL_CALL write(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectOutputStream>& _rxOutStream) throw ( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
@@ -103,6 +104,9 @@ public:
     virtual void SAL_CALL startProduction(  ) throw (::com::sun::star::uno::RuntimeException);
 
     // OControlModel's property handling
+    virtual void describeAggregateProperties(
+        ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rAggregateProps
+    ) const;
     virtual void describeFixedProperties(
         ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rProps
     ) const;
@@ -119,6 +123,8 @@ protected:
                             translateDbColumnToControlValue( );
     virtual sal_Bool        commitControlValueToDbColumn( bool _bPostReset );
 
+    virtual ::com::sun::star::uno::Any
+                            getControlValue( ) const;
     virtual void            doSetControlValue( const ::com::sun::star::uno::Any& _rValue );
 
     virtual sal_Bool        approveDbColumnType(sal_Int32 _nColumnType);
@@ -134,7 +140,7 @@ protected:
         @precond
             our own mutex is locked
     */
-    sal_Bool    impl_handleNewImageURL_lck( const ::rtl::OUString& _rURL, ValueChangeInstigator _eInstigator );
+    sal_Bool    impl_handleNewImageURL_lck( ValueChangeInstigator _eInstigator );
 
     /** updates the binary stream, created from loading the file which the given URL points to, into our
         bound field, or the control itself if there is no bound field
diff --git a/forms/source/inc/FormComponent.hxx b/forms/source/inc/FormComponent.hxx
index de72e2b392e8..0c8b421008a3 100644
--- a/forms/source/inc/FormComponent.hxx
+++ b/forms/source/inc/FormComponent.hxx
@@ -759,6 +759,18 @@ protected:
                                 sal_Int32 _nValuePropertyExternalHandle
                             );
 
+    /** initializes the part of the class which is related to the control value.
+
+        

In opposite to ->initValueProperty, this method is to be used for value properties which are not + implemented by our aggregate, but by ourselves.

+ +

Certain functionality is not available when using own value properties. This includes binding to an external + value and external validation. (This is not a conceptual limit, but simply missing implementation.)

+ */ + void initOwnValueProperty( + const ::rtl::OUString& i_rValuePropertyName + ); + /** suspends listening at the value property

As long as this listening is suspended, changes in the value property will not be @@ -782,6 +794,16 @@ protected: */ void resumeValueListening( ); + /** (to be) called when the value property changed + + Normally, this is done automatically, since the value property is a property of our aggregate, and we're + a listener at this property. + However, in some cases the value property might not be an aggregate property, but a property of the + delegator instance. In this case, you'll need to call onValuePropertyChange whenever this + property changes. + */ + void onValuePropertyChange( ControlModelLock& i_rControLock ); + /** starts listening at the aggregate, for changes in the given property

The OBoundControlModel automatically registers a multiplexer which listens for diff --git a/forms/source/inc/frm_strings.hxx b/forms/source/inc/frm_strings.hxx index 8a8105d2e1a7..1e3b1b1bd312 100644 --- a/forms/source/inc/frm_strings.hxx +++ b/forms/source/inc/frm_strings.hxx @@ -141,6 +141,7 @@ namespace frm FORMS_CONSTASCII_STRING( PROPERTY_SUBMIT_METHOD, "SubmitMethod" ); FORMS_CONSTASCII_STRING( PROPERTY_SUBMIT_ENCODING, "SubmitEncoding" ); FORMS_CONSTASCII_STRING( PROPERTY_IMAGE_URL, "ImageURL" ); + FORMS_CONSTASCII_STRING( PROPERTY_GRAPHIC, "Graphic" ); FORMS_CONSTASCII_STRING( PROPERTY_IMAGE_POSITION, "ImagePosition" ); FORMS_CONSTASCII_STRING( PROPERTY_EMPTY_IS_NULL, "ConvertEmptyToNull" ); FORMS_CONSTASCII_STRING( PROPERTY_LISTSOURCETYPE, "ListSourceType" ); diff --git a/forms/source/inc/property.hrc b/forms/source/inc/property.hrc index c1064e6d56b9..0582ce36c6ee 100644 --- a/forms/source/inc/property.hrc +++ b/forms/source/inc/property.hrc @@ -61,7 +61,7 @@ namespace frm #define PROPERTY_ID_WRITING_MODE (PROPERTY_ID_START + 20) #define PROPERTY_ID_CONTEXT_WRITING_MODE (PROPERTY_ID_START + 21) #define PROPERTY_ID_VERTICAL_ALIGN (PROPERTY_ID_START + 22) - // free +#define PROPERTY_ID_GRAPHIC (PROPERTY_ID_START + 23) // free // free // free diff --git a/forms/source/misc/property.cxx b/forms/source/misc/property.cxx index 04bc9c8c8911..fffb7557ad5e 100644 --- a/forms/source/misc/property.cxx +++ b/forms/source/misc/property.cxx @@ -134,6 +134,7 @@ void PropertyInfoService::initialize() ADD_PROP_ASSIGNMENT(SUBMIT_METHOD); ADD_PROP_ASSIGNMENT(SUBMIT_ENCODING); ADD_PROP_ASSIGNMENT(IMAGE_URL); + ADD_PROP_ASSIGNMENT(GRAPHIC); ADD_PROP_ASSIGNMENT(EMPTY_IS_NULL); ADD_PROP_ASSIGNMENT(LISTSOURCETYPE); ADD_PROP_ASSIGNMENT(LISTSOURCE); -- cgit From 33ddb6e91decfac211b833931be57180e18cc11b Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 26 Aug 2010 17:14:25 +0200 Subject: dba33h: #i114122# don't set GraphicObject-URLs at the image control/model, instead, just set the XGraphic, and let the implementation manage the respective XGraphicObject instance and its life time --- forms/source/component/ImageControl.cxx | 65 +++++++++++++++++++++++++-------- forms/source/component/ImageControl.hxx | 7 ++-- 2 files changed, 53 insertions(+), 19 deletions(-) diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx index 6d9fad98c6ca..3a7e05404d75 100644 --- a/forms/source/component/ImageControl.cxx +++ b/forms/source/component/ImageControl.cxx @@ -151,9 +151,10 @@ OImageControlModel::OImageControlModel(const Reference& _r :OBoundControlModel( _rxFactory, VCL_CONTROLMODEL_IMAGECONTROL, FRM_SUN_CONTROL_IMAGECONTROL, sal_False, sal_False, sal_False ) // use the old control name for compytibility reasons ,m_pImageProducer( NULL ) + ,m_bExternalGraphic( true ) ,m_bReadOnly( sal_False ) ,m_sImageURL() - ,m_xGraphic() + ,m_xGraphicObject() { DBG_CTOR( OImageControlModel, NULL ); m_nClassId = FormComponentType::IMAGECONTROL; @@ -167,9 +168,10 @@ OImageControlModel::OImageControlModel( const OImageControlModel* _pOriginal, co :OBoundControlModel( _pOriginal, _rxFactory ) // use the old control name for compytibility reasons ,m_pImageProducer( NULL ) + ,m_bExternalGraphic( true ) ,m_bReadOnly( _pOriginal->m_bReadOnly ) ,m_sImageURL( _pOriginal->m_sImageURL ) - ,m_xGraphic( _pOriginal->m_xGraphic ) + ,m_xGraphicObject( _pOriginal->m_xGraphicObject ) { DBG_CTOR( OImageControlModel, NULL ); implConstruct(); @@ -255,7 +257,7 @@ void OImageControlModel::getFastPropertyValue(Any& rValue, sal_Int32 nHandle) co rValue <<= m_sImageURL; break; case PROPERTY_ID_GRAPHIC: - rValue <<= m_xGraphic; + rValue <<= m_xGraphicObject.is() ? m_xGraphicObject->getGraphic() : Reference< XGraphic >(); break; default: OBoundControlModel::getFastPropertyValue(rValue, nHandle); @@ -284,8 +286,35 @@ void OImageControlModel::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, con break; case PROPERTY_ID_GRAPHIC: - OSL_VERIFY( rValue >>= m_xGraphic ); - break; + { + Reference< XGraphic > xGraphic; + OSL_VERIFY( rValue >>= xGraphic ); + if ( !xGraphic.is() ) + m_xGraphicObject.clear(); + else + { + m_xGraphicObject = GraphicObject::create( m_aContext.getUNOContext() ); + m_xGraphicObject->setGraphic( xGraphic ); + } + + if ( m_bExternalGraphic ) + { + // if that's an external graphic, i.e. one which has not been loaded by ourselves in response to a + // new image URL, then also adjust our ImageURL. + ::rtl::OUString sNewImageURL; + if ( m_xGraphicObject.is() ) + { + sNewImageURL = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.GraphicObject:" ) ); + sNewImageURL = sNewImageURL + m_xGraphicObject->getUniqueID(); + } + m_sImageURL = sNewImageURL; + // TODO: speaking strictly, this would need to be notified, since ImageURL is a bound property. However, + // this method here is called with a locked mutex, so we cannot simply call listeners ... + // I think the missing notification (and thus clients which potentially cannot observe the change) + // is less severe than the potential deadlock ... + } + } + break; default: OBoundControlModel::setFastPropertyValue_NoBroadcast(nHandle, rValue); @@ -306,7 +335,10 @@ sal_Bool OImageControlModel::convertFastPropertyValue(Any& rConvertedValue, Any& return tryPropertyValue( rConvertedValue, rOldValue, rValue, m_sImageURL ); case PROPERTY_ID_GRAPHIC: - return tryPropertyValue( rConvertedValue, rOldValue, rValue, m_xGraphic ); + { + const Reference< XGraphic > xGraphic( getFastPropertyValue( PROPERTY_ID_GRAPHIC ), UNO_QUERY ); + return tryPropertyValue( rConvertedValue, rOldValue, rValue, xGraphic ); + } default: return OBoundControlModel::convertFastPropertyValue(rConvertedValue, rOldValue, nHandle, rValue); @@ -660,10 +692,16 @@ void SAL_CALL OImageControlModel::startProduction( ) throw (RuntimeException) IMPL_LINK( OImageControlModel, OnImageImportDone, ::Graphic*, i_pGraphic ) { const Reference< XGraphic > xGraphic( i_pGraphic != NULL ? Image( i_pGraphic->GetBitmapEx() ).GetXGraphic() : NULL ); - setPropertyValue( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Graphic" ) ), - makeAny( xGraphic ) - ); + m_bExternalGraphic = false; + try + { + setPropertyValue( PROPERTY_GRAPHIC, makeAny( xGraphic ) ); + } + catch ( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + m_bExternalGraphic = true; return 1L; } @@ -828,12 +866,7 @@ bool OImageControlControl::implInsertGraphics() { Graphic aGraphic; aDialog.GetGraphic( aGraphic ); - - Reference< graphic::XGraphicObject > xGrfObj = graphic::GraphicObject::create( m_aContext.getUNOContext() ); - xGrfObj->setGraphic( aGraphic.GetXGraphic() ); - rtl::OUString sObjectID( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.GraphicObject:" ) ); - sObjectID = sObjectID + xGrfObj->getUniqueID(); - xSet->setPropertyValue( PROPERTY_IMAGE_URL, makeAny( ::rtl::OUString( sObjectID ) ) ); + xSet->setPropertyValue( PROPERTY_GRAPHIC, makeAny( aGraphic.GetXGraphic() ) ); } else xSet->setPropertyValue( PROPERTY_IMAGE_URL, makeAny( ::rtl::OUString( aDialog.GetPath() ) ) ); diff --git a/forms/source/component/ImageControl.hxx b/forms/source/component/ImageControl.hxx index 75bc48dd9c8e..853c4aadffbf 100644 --- a/forms/source/component/ImageControl.hxx +++ b/forms/source/component/ImageControl.hxx @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include @@ -58,10 +58,11 @@ class OImageControlModel { ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageProducer> m_xImageProducer; ImageProducer* m_pImageProducer; + bool m_bExternalGraphic; sal_Bool m_bReadOnly; ::rtl::OUString m_sImageURL; - ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > - m_xGraphic; + ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphicObject > + m_xGraphicObject; ::rtl::OUString m_sDocumentURL; protected: -- cgit From 2b5c7e15c095fa10545d4c4a22e68467becd617f Mon Sep 17 00:00:00 2001 From: sb Date: Mon, 30 Aug 2010 16:22:08 +0200 Subject: sb123: #i114209# disabled forms.OGridControlModel::com::sun::star::view::XSelectionSupplier for now --- forms/qa/unoapi/knownissues.xcl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/forms/qa/unoapi/knownissues.xcl b/forms/qa/unoapi/knownissues.xcl index 09c1dee86d72..eb8efe91b4f0 100644 --- a/forms/qa/unoapi/knownissues.xcl +++ b/forms/qa/unoapi/knownissues.xcl @@ -128,5 +128,8 @@ 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 -- cgit From 65221b651bed8d6741238d634b1d5b741a373dfc Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Tue, 31 Aug 2010 09:17:25 +0200 Subject: fwk155: #i107615# integrate the patch from CD --- cui/source/customize/cfg.cxx | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index d9f730e0224f..022cc1cfb72c 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -1177,7 +1177,11 @@ bool MenuSaveInData::LoadSubMenus( const OUString& rBaseTitle, SvxConfigEntry* pParentData ) { - SvxEntries* pEntries = pParentData->GetEntries(); + SvxEntries* pEntries = pParentData->GetEntries(); + + // Don't access non existing menu configuration! + if ( !xMenuSettings.is() ) + return true; for ( sal_Int32 nIndex = 0; nIndex < xMenuSettings->getCount(); nIndex++ ) { @@ -2594,17 +2598,20 @@ IMPL_LINK( SvxMenuConfigPage, SelectMenu, ListBox *, pBox ) SvxConfigEntry* pMenuData = GetTopLevelSelection(); PopupMenu* pPopup = aModifyTopLevelButton.GetPopupMenu(); - pPopup->EnableItem( ID_DELETE, pMenuData->IsDeletable() ); - pPopup->EnableItem( ID_RENAME, pMenuData->IsRenamable() ); - pPopup->EnableItem( ID_MOVE, pMenuData->IsMovable() ); + if ( pMenuData ) + { + pPopup->EnableItem( ID_DELETE, pMenuData->IsDeletable() ); + pPopup->EnableItem( ID_RENAME, pMenuData->IsRenamable() ); + pPopup->EnableItem( ID_MOVE, pMenuData->IsMovable() ); - SvxEntries* pEntries = pMenuData->GetEntries(); - SvxEntries::const_iterator iter = pEntries->begin(); + SvxEntries* pEntries = pMenuData->GetEntries(); + SvxEntries::const_iterator iter = pEntries->begin(); - for ( ; iter != pEntries->end(); iter++ ) - { - SvxConfigEntry* pEntry = *iter; - InsertEntryIntoUI( pEntry ); + for ( ; iter != pEntries->end(); iter++ ) + { + SvxConfigEntry* pEntry = *iter; + InsertEntryIntoUI( pEntry ); + } } UpdateButtonStates(); -- cgit From 6754c7bece410ed511e9e8a8c53a2d5a78119fc0 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Wed, 1 Sep 2010 13:19:13 +0200 Subject: cws tl82: #i114233# add to dictionary fixed in spell check dialog --- cui/source/dialogs/SpellDialog.cxx | 103 ++++++++++++++++++++----------------- 1 file changed, 55 insertions(+), 48 deletions(-) diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 303b54688eea..4fde01da986e 100755 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -76,6 +76,8 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::linguistic2; +using ::rtl::OUString; + #define C2U(cChar) ::rtl::OUString::createFromAscii(cChar) // struct SpellDialog_Impl --------------------------------------------- @@ -930,7 +932,7 @@ void SpellDialog::SetTitle_Impl(LanguageType nLang) -----------------------------------------------------------------------*/ void SpellDialog::InitUserDicts() { - sal_uInt16 nLang = aLanguageLB.GetSelectLanguage(); + const LanguageType nLang = aLanguageLB.GetSelectLanguage(); const Reference< XDictionary > *pDic = 0; @@ -948,51 +950,50 @@ void SpellDialog::InitUserDicts() pImpl->aDics = xDicList->getDictionaries(); } - // Benutzerbuecher anzeigen + SvtLinguConfig aCfg; + const bool bHC = Application::GetSettings().GetStyleSettings().GetHighContrastMode(); + + // list suitable dictionaries + bool bEnable = false; const sal_Int32 nSize = pImpl->aDics.getLength(); pDic = pImpl->aDics.getConstArray(); - sal_Int32 i; delete aAddToDictMB.GetPopupMenu(); PopupMenu* pMenu = new PopupMenu; - for (i = 0; i < nSize; ++i ) + pMenu->SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS); + USHORT nItemId = 1; // menu items should be enumerated from 1 and not 0 + for (sal_Int32 i = 0; i < nSize; ++i) { - Reference< XDictionary > xDic( pDic[i], UNO_QUERY ); - if (!xDic.is() || SvxGetIgnoreAllList() == xDic) + uno::Reference< linguistic2::XDictionary > xDicTmp( pDic[i], uno::UNO_QUERY ); + if (!xDicTmp.is() || SvxGetIgnoreAllList() == xDicTmp) continue; - // add only active and not read-only dictionaries to list - // from which to choose from - Reference< frame::XStorable > xStor( xDic, UNO_QUERY ); - if ( xDic->isActive() && (!xStor.is() || !xStor->isReadonly()) ) + uno::Reference< frame::XStorable > xStor( xDicTmp, uno::UNO_QUERY ); + LanguageType nActLanguage = SvxLocaleToLanguage( xDicTmp->getLocale() ); + if( xDicTmp->isActive() + && xDicTmp->getDictionaryType() != linguistic2::DictionaryType_NEGATIVE + && (nLang == nActLanguage || LANGUAGE_NONE == nActLanguage ) + && (!xStor.is() || !xStor->isReadonly()) ) { - sal_Bool bNegativ = xDic->getDictionaryType() == DictionaryType_NEGATIVE; - pMenu->InsertItem( (USHORT)i + 1, ::GetDicInfoStr( xDic->getName(), - SvxLocaleToLanguage( xDic->getLocale() ), bNegativ ) ); - } - } - aAddToDictMB.SetPopupMenu(pMenu); - - aAddToDictMB.Disable(); + pMenu->InsertItem( nItemId, xDicTmp->getName() ); + bEnable = sal_True; - sal_uInt16 k; - for ( k = 0; k < pMenu->GetItemCount(); ++k ) - { - sal_uInt16 nId = pMenu->GetItemId(k) - 1; - sal_Bool bFound = sal_False; - - const sal_uInt16 nDicLang = SvxLocaleToLanguage( pDic[nId]->getLocale() ); - const sal_Bool bDicNegativ = - pDic[nId]->getDictionaryType() == DictionaryType_NEGATIVE; - // Stimmt die Sprache "uberein, dann enable - if ((nDicLang == nLang || nDicLang == LANGUAGE_NONE) && !bDicNegativ) - bFound = sal_True; + uno::Reference< lang::XServiceInfo > xSvcInfo( xDicTmp, uno::UNO_QUERY ); + if (xSvcInfo.is()) + { + OUString aDictionaryImageUrl( aCfg.GetSpellAndGrammarContextDictionaryImage( + xSvcInfo->getImplementationName(), bHC) ); + if (aDictionaryImageUrl.getLength() > 0) + { + Image aImage( lcl_GetImageFromPngUrl( aDictionaryImageUrl ) ); + pMenu->SetItemImage( nItemId, aImage ); + } + } - if (bFound) - { - aAddToDictMB.Enable(); - break; + ++nItemId; } } + aAddToDictMB.SetPopupMenu(pMenu); + aAddToDictMB.Enable( bEnable ); } /*-- 20.10.2003 15:31:06--------------------------------------------------- @@ -1000,31 +1001,39 @@ void SpellDialog::InitUserDicts() IMPL_LINK(SpellDialog, AddToDictionaryHdl, MenuButton*, pButton ) { aSentenceED.UndoActionStart( SPELLUNDO_CHANGE_GROUP ); - USHORT nItem = pButton->GetCurItemId(); //GetErrorText() returns the current error even if the text is already //manually changed - String sNewWord= aSentenceED.GetErrorText(); + const String aNewWord= aSentenceED.GetErrorText(); + + USHORT nItemId = pButton->GetCurItemId(); + PopupMenu *pMenu = pButton->GetPopupMenu(); + String aDicName ( pMenu->GetItemText( nItemId ) ); + + uno::Reference< linguistic2::XDictionary > xDic; + uno::Reference< linguistic2::XDictionaryList > xDicList( SvxGetDictionaryList() ); + if (xDicList.is()) + xDic = xDicList->getDictionaryByName( aDicName ); - Reference< XDictionary > xDic( pImpl->aDics.getConstArray()[ nItem - 1 ], UNO_QUERY ); sal_Int16 nAddRes = DIC_ERR_UNKNOWN; if (xDic.is()) { - String sTmpTxt( sNewWord ); - sal_Bool bNegEntry = xDic->getDictionaryType() == DictionaryType_NEGATIVE; - nAddRes = linguistic::AddEntryToDic( xDic, sTmpTxt, bNegEntry, - ::rtl::OUString(), LANGUAGE_NONE ); + nAddRes = linguistic::AddEntryToDic( xDic, aNewWord, FALSE, OUString(), LANGUAGE_NONE ); + // save modified user-dictionary if it is persistent + uno::Reference< frame::XStorable > xSavDic( xDic, uno::UNO_QUERY ); + if (xSavDic.is()) + xSavDic->store(); - if(nAddRes == DIC_ERR_NONE) + if (nAddRes == DIC_ERR_NONE) { SpellUndoAction_Impl* pAction = new SpellUndoAction_Impl( SPELLUNDO_CHANGE_ADD_TO_DICTIONARY, aDialogUndoLink); - pAction->SetDictionary(xDic); - pAction->SetAddedWord(sTmpTxt); - aSentenceED.AddUndoAction(pAction); + pAction->SetDictionary( xDic ); + pAction->SetAddedWord( aNewWord ); + aSentenceED.AddUndoAction( pAction ); } // failed because there is already an entry? - if (DIC_ERR_NONE != nAddRes && xDic->getEntry( sTmpTxt ).is()) + if (DIC_ERR_NONE != nAddRes && xDic->getEntry( aNewWord ).is()) nAddRes = DIC_ERR_NONE; } if (DIC_ERR_NONE != nAddRes) @@ -1032,8 +1041,6 @@ IMPL_LINK(SpellDialog, AddToDictionaryHdl, MenuButton*, pButton ) SvxDicError( this, nAddRes ); return 0; // Nicht weitermachen } - // nach dem Aufnehmen ggf. '='-Zeichen entfernen - sNewWord.EraseAllChars( sal_Unicode( '=' ) ); // go on SpellContinue_Impl(); -- cgit From c2ac9c93bde6d0d555e97732fe8b20dde43aa1ed Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 1 Sep 2010 14:59:07 +0200 Subject: dba33i: #i111146# migrated all SFX-based applications to use named views --- basctl/source/basicide/basidesh.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index 2f9303756e09..55dec2566205 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -155,7 +155,7 @@ public: TYPEINIT1( BasicIDEShell, SfxViewShell ); -SFX_IMPL_VIEWFACTORY( BasicIDEShell, IDEResId( SVX_INTERFACE_BASIDE_VIEWSH ) ) +SFX_IMPL_NAMED_VIEWFACTORY( BasicIDEShell, "Default" ) { SFX_VIEW_REGISTRATION( BasicDocShell ); } -- cgit From 43ace9c1b12b78932d9de462a2710cb71944292f Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 4 Sep 2010 17:28:24 +0100 Subject: cmcfixes78: #i111733# fflush on stdin --- xmlsecurity/tools/demo/util2.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xmlsecurity/tools/demo/util2.cxx b/xmlsecurity/tools/demo/util2.cxx index 955cb94a0474..0ec576d8d3f8 100644 --- a/xmlsecurity/tools/demo/util2.cxx +++ b/xmlsecurity/tools/demo/util2.cxx @@ -384,7 +384,7 @@ void QueryPrintSignatureDetails( const SignatureInformations& SignatureInformati { char cShowDetails; fprintf( stdout, "\nDisplay details (y/n) [y]?" ); - fflush(stdin); + fflush( stdout ); fscanf( stdin, "%c", &cShowDetails); if ( cShowDetails == 'y' ) { @@ -409,7 +409,7 @@ int QuerySelectNumber( int nMin, int nMax ) do { fprintf( stdout, "\nSelect <%d-%d>:", nMin, nMax ) ; - fflush(stdin); + fflush( stdout ); fscanf( stdin, "%d", &sel ) ; } while( ( sel < nMin ) || ( sel > nMax ) ); @@ -420,7 +420,7 @@ long QueryVerifySignature() { char answer; fprintf( stdout, "\nFound a signature - verify this one (y/n) [y]?" ); - fflush(stdin); + fflush( stdout ); fscanf( stdin, "%c", &answer); return (answer == 'n')?0:1; } -- cgit From ff4d607364b8033782b42cef9d2e33b99fb2e160 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Mon, 6 Sep 2010 10:02:33 +0200 Subject: cws tl82: #i114160# SimplePasswordRequest and respective dialog --- cui/source/options/webconninfo.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) mode change 100644 => 100755 cui/source/options/webconninfo.cxx diff --git a/cui/source/options/webconninfo.cxx b/cui/source/options/webconninfo.cxx old mode 100644 new mode 100755 index 5c5dcdae4ade..c52168fb1ab6 --- a/cui/source/options/webconninfo.cxx +++ b/cui/source/options/webconninfo.cxx @@ -311,10 +311,8 @@ IMPL_LINK( WebConnectionInfoDialog, ChangePasswordHdl, PushButton*, EMPTYARG ) ::rtl::OUString aURL = m_aPasswordsLB.GetEntryText( pEntry, 0 ); ::rtl::OUString aUserName = m_aPasswordsLB.GetEntryText( pEntry, 1 ); - ::comphelper::DocPasswordRequest* pPasswordRequest - = new ::comphelper::DocPasswordRequest( - ::comphelper::DocPasswordRequestType_STANDARD, - task::PasswordRequestMode_PASSWORD_CREATE, aURL ); + ::comphelper::SimplePasswordRequest* pPasswordRequest + = new ::comphelper::SimplePasswordRequest( task::PasswordRequestMode_PASSWORD_CREATE ); uno::Reference< task::XInteractionRequest > rRequest( pPasswordRequest ); uno::Reference< task::XInteractionHandler > xInteractionHandler( -- cgit From 5dbc43ead1b7ff5fa0c1f6756a9ca6062c48d033 Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 10 Sep 2010 13:10:07 +0200 Subject: sb129: #i113189# change UNO components to use passive registration --- UnoControls/prj/d.lst | 1 + UnoControls/source/base/registercontrols.cxx | 100 -------- UnoControls/util/ctl.component | 43 ++++ UnoControls/util/makefile.mk | 8 + .../org/openoffice/accessibility/AccessBridge.java | 5 - .../accessibility/java_uno_accessbridge.component | 34 +++ .../org/openoffice/accessibility/makefile.mk | 7 + accessibility/prj/d.lst | 2 +- basctl/prj/d.lst | 1 + basctl/source/basicide/register.cxx | 22 -- basctl/util/basctl.component | 34 +++ basctl/util/basctl.map | 1 - basctl/util/makefile.mk | 8 + embedserv/prj/d.lst | 1 + embedserv/source/embed/register.cxx | 30 +-- embedserv/util/emser.component | 34 +++ embedserv/util/exports.dxp | 1 - embedserv/util/makefile.mk | 8 + extensions/prj/d.lst | 17 ++ extensions/source/abpilot/abp.component | 34 +++ extensions/source/abpilot/abpservices.cxx | 21 -- extensions/source/abpilot/exports.dxp | 1 - extensions/source/abpilot/makefile.mk | 8 + extensions/source/bibliography/bib.component | 35 +++ extensions/source/bibliography/bibload.cxx | 30 --- extensions/source/bibliography/makefile.mk | 8 + extensions/source/config/ldap/componentdef.cxx | 7 - extensions/source/config/ldap/exports.dxp | 1 - extensions/source/config/ldap/ldapbe2.component | 34 +++ extensions/source/config/ldap/makefile.mk | 8 + extensions/source/dbpilots/dbp.component | 40 ++++ extensions/source/dbpilots/dbpservices.cxx | 21 -- extensions/source/dbpilots/makefile.mk | 8 + extensions/source/inc/componentmodule.cxx | 48 ---- extensions/source/inc/componentmodule.hxx | 15 -- extensions/source/logging/log.component | 47 ++++ extensions/source/logging/makefile.mk | 8 + extensions/source/ole/makefile.mk | 7 + extensions/source/ole/oleautobridge.component | 46 ++++ extensions/source/ole/oleautobridge.uno.dxp | 1 - extensions/source/ole/servreg.cxx | 41 ---- extensions/source/oooimprovecore/makefile.mk | 8 + .../source/oooimprovecore/oooimprovecore.component | 34 +++ extensions/source/oooimprovement/makefile.mk | 8 + .../source/oooimprovement/oooimprovement.component | 40 ++++ .../oooimprovement/oooimprovement_exports.cxx | 22 -- extensions/source/plugin/base/service.cxx | 27 --- extensions/source/plugin/util/makefile.mk | 8 + extensions/source/plugin/util/pl.component | 37 +++ extensions/source/preload/makefile.mk | 8 + extensions/source/preload/preload.component | 34 +++ extensions/source/preload/services.cxx | 21 -- extensions/source/propctrlr/makefile.mk | 8 + extensions/source/propctrlr/pcr.component | 91 ++++++++ extensions/source/propctrlr/pcrservices.cxx | 21 -- extensions/source/resource/exports.dxp | 1 - extensions/source/resource/makefile.mk | 8 + extensions/source/resource/res.component | 38 +++ extensions/source/resource/res_services.cxx | 42 ---- extensions/source/scanner/exports.dxp | 1 - extensions/source/scanner/makefile.mk | 8 + extensions/source/scanner/scn.component | 34 +++ extensions/source/scanner/scnserv.cxx | 31 --- extensions/source/svg/svguno.cxx | 30 --- extensions/source/update/check/makefile.mk | 8 + extensions/source/update/check/updatecheckjob.cxx | 12 - .../source/update/check/updchk.uno.component | 37 +++ extensions/source/update/feed/makefile.mk | 8 + extensions/source/update/feed/updatefeed.component | 34 +++ extensions/source/update/feed/updatefeed.cxx | 12 - extensions/source/update/ui/makefile.mk | 8 + extensions/source/update/ui/updatecheckui.cxx | 12 - extensions/source/update/ui/updchk.component | 34 +++ extensions/source/xmlextract/makefile.mk | 8 + extensions/source/xmlextract/xmx.component | 34 +++ extensions/source/xmlextract/xmxuno.cxx | 21 -- forms/prj/d.lst | 1 + forms/source/inc/forms_module.hxx | 15 -- forms/source/inc/forms_module_impl.hxx | 48 ---- forms/source/misc/services.cxx | 67 ------ forms/util/frm.component | 259 +++++++++++++++++++++ forms/util/frm.dxp | 1 - forms/util/makefile.mk | 8 + lingucomponent/prj/d.lst | 5 + .../hyphenator/altlinuxhyph/hyphen/exports.dxp | 1 - .../source/hyphenator/altlinuxhyph/hyphen/hreg.cxx | 9 - .../altlinuxhyph/hyphen/hyphen.component | 34 +++ .../hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx | 26 --- .../hyphenator/altlinuxhyph/hyphen/makefile.mk | 8 + .../source/languageguessing/guesslang.component | 34 +++ .../source/languageguessing/guesslang.cxx | 7 - lingucomponent/source/languageguessing/makefile.mk | 8 + .../spellcheck/macosxspell/MacOSXSpell.component | 34 +++ .../source/spellcheck/macosxspell/macreg.cxx | 9 - .../source/spellcheck/macosxspell/macspellimp.cxx | 26 --- .../source/spellcheck/macosxspell/makefile.mk | 8 + lingucomponent/source/spellcheck/spell/exports.dxp | 1 - lingucomponent/source/spellcheck/spell/makefile.mk | 8 + .../source/spellcheck/spell/spell.component | 34 +++ lingucomponent/source/spellcheck/spell/sreg.cxx | 9 - .../source/spellcheck/spell/sspellimp.cxx | 26 --- lingucomponent/source/thesaurus/libnth/exports.dxp | 1 - .../source/thesaurus/libnth/lnth.component | 34 +++ lingucomponent/source/thesaurus/libnth/makefile.mk | 8 + .../source/thesaurus/libnth/nthesimp.cxx | 25 -- lingucomponent/source/thesaurus/libnth/ntreg.cxx | 9 - package/prj/d.lst | 2 + package/source/manifest/UnoRegister.cxx | 63 ----- package/source/xstor/makefile.mk | 8 + package/source/xstor/register.cxx | 28 --- package/source/xstor/xstor.component | 35 +++ package/source/xstor/xstor.dxp | 1 - package/util/exports.dxp | 1 - package/util/makefile.mk | 8 + package/util/package2.component | 44 ++++ .../com/sun/star/wizards/agenda/CallWizard.java | 18 +- .../com/sun/star/wizards/agenda/agenda.component | 35 +++ wizards/com/sun/star/wizards/agenda/makefile.mk | 8 + wizards/com/sun/star/wizards/fax/CallWizard.java | 19 +- wizards/com/sun/star/wizards/fax/fax.component | 35 +++ wizards/com/sun/star/wizards/fax/makefile.mk | 8 + .../com/sun/star/wizards/form/CallFormWizard.java | 17 +- wizards/com/sun/star/wizards/form/form.component | 35 +++ wizards/com/sun/star/wizards/form/makefile.mk | 8 + .../com/sun/star/wizards/letter/CallWizard.java | 19 +- .../com/sun/star/wizards/letter/letter.component | 35 +++ wizards/com/sun/star/wizards/letter/makefile.mk | 8 + .../sun/star/wizards/query/CallQueryWizard.java | 17 +- wizards/com/sun/star/wizards/query/makefile.mk | 8 + wizards/com/sun/star/wizards/query/query.component | 35 +++ .../sun/star/wizards/report/CallReportWizard.java | 20 +- wizards/com/sun/star/wizards/report/makefile.mk | 8 + .../com/sun/star/wizards/report/report.component | 35 +++ .../sun/star/wizards/table/CallTableWizard.java | 17 +- wizards/com/sun/star/wizards/table/makefile.mk | 8 + wizards/com/sun/star/wizards/table/table.component | 35 +++ wizards/com/sun/star/wizards/web/CallWizard.java | 19 +- wizards/com/sun/star/wizards/web/makefile.mk | 8 + wizards/com/sun/star/wizards/web/web.component | 35 +++ wizards/prj/d.lst | 8 + xmlsecurity/prj/d.lst | 3 + xmlsecurity/source/component/registerservices.cxx | 42 ---- xmlsecurity/source/framework/xsec_framework.cxx | 77 ------ xmlsecurity/source/xmlsec/xsec_xmlsec.cxx | 71 ------ xmlsecurity/util/exports_xsmscrypt.dxp | 1 - xmlsecurity/util/exports_xsnss.dxp | 1 - xmlsecurity/util/makefile.mk | 27 +++ xmlsecurity/util/xmlsecurity.component | 37 +++ xmlsecurity/util/xsec_fw.component | 56 +++++ xmlsecurity/util/xsec_fw.dxp | 1 - xmlsecurity/util/xsec_xmlsec.component | 55 +++++ xmlsecurity/util/xsec_xmlsec.windows.component | 55 +++++ 152 files changed, 2189 insertions(+), 1302 deletions(-) create mode 100644 UnoControls/util/ctl.component create mode 100644 accessibility/bridge/org/openoffice/accessibility/java_uno_accessbridge.component create mode 100644 basctl/util/basctl.component create mode 100644 embedserv/util/emser.component create mode 100644 extensions/source/abpilot/abp.component create mode 100644 extensions/source/bibliography/bib.component create mode 100644 extensions/source/config/ldap/ldapbe2.component create mode 100644 extensions/source/dbpilots/dbp.component create mode 100644 extensions/source/logging/log.component create mode 100644 extensions/source/ole/oleautobridge.component create mode 100644 extensions/source/oooimprovecore/oooimprovecore.component create mode 100644 extensions/source/oooimprovement/oooimprovement.component create mode 100644 extensions/source/plugin/util/pl.component create mode 100644 extensions/source/preload/preload.component create mode 100644 extensions/source/propctrlr/pcr.component create mode 100644 extensions/source/resource/res.component create mode 100644 extensions/source/scanner/scn.component create mode 100644 extensions/source/update/check/updchk.uno.component create mode 100644 extensions/source/update/feed/updatefeed.component create mode 100644 extensions/source/update/ui/updchk.component create mode 100644 extensions/source/xmlextract/xmx.component create mode 100644 forms/util/frm.component create mode 100644 lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphen.component create mode 100644 lingucomponent/source/languageguessing/guesslang.component create mode 100644 lingucomponent/source/spellcheck/macosxspell/MacOSXSpell.component create mode 100644 lingucomponent/source/spellcheck/spell/spell.component create mode 100644 lingucomponent/source/thesaurus/libnth/lnth.component create mode 100644 package/source/xstor/xstor.component create mode 100644 package/util/package2.component create mode 100644 wizards/com/sun/star/wizards/agenda/agenda.component create mode 100644 wizards/com/sun/star/wizards/fax/fax.component create mode 100644 wizards/com/sun/star/wizards/form/form.component create mode 100644 wizards/com/sun/star/wizards/letter/letter.component create mode 100644 wizards/com/sun/star/wizards/query/query.component create mode 100644 wizards/com/sun/star/wizards/report/report.component create mode 100644 wizards/com/sun/star/wizards/table/table.component create mode 100644 wizards/com/sun/star/wizards/web/web.component create mode 100644 xmlsecurity/util/xmlsecurity.component create mode 100644 xmlsecurity/util/xsec_fw.component create mode 100644 xmlsecurity/util/xsec_xmlsec.component create mode 100644 xmlsecurity/util/xsec_xmlsec.windows.component diff --git a/UnoControls/prj/d.lst b/UnoControls/prj/d.lst index 5f65d3c80717..370fc0c9fc46 100644 --- a/UnoControls/prj/d.lst +++ b/UnoControls/prj/d.lst @@ -3,3 +3,4 @@ ..\%__SRC%\lib\*.sl %_DEST%\lib%_EXT%\*.sl ..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\*.res ..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib +..\%__SRC%\misc\ctl.component %_DEST%\xml%_EXT%\ctl.component diff --git a/UnoControls/source/base/registercontrols.cxx b/UnoControls/source/base/registercontrols.cxx index 686c7578b88d..6a10f42b8fb8 100644 --- a/UnoControls/source/base/registercontrols.cxx +++ b/UnoControls/source/base/registercontrols.cxx @@ -92,59 +92,6 @@ using namespace ::com::sun::star::registry ; return Reference< XInterface >( *(OWeakObject*)(new CLASS( rServiceManager )) ); \ } -//****************************************************************************************************************************** -#define COMPONENT_INFO(CLASS) \ - \ - AS_DBG_OUT ( "\tCOMPONENT_INFO():\t[start]\n" ) \ - try \ - { \ - /* Set default result of follow operations !!! */ \ - bReturn = sal_False ; \ - \ - /* Do the follow only, if given key is valid ! */ \ - if ( xKey.is () ) \ - { \ - AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\txkey is valid ...\n" ) \ - /* Build new keyname */ \ - sKeyName = OUString::createFromAscii( "/" ) ; \ - sKeyName += CLASS::impl_getStaticImplementationName() ; \ - sKeyName += OUString::createFromAscii( "/UNO/SERVICES" ); \ - \ - /* Create new key with new name. */ \ - xNewKey = xKey->createKey( sKeyName ); \ - \ - /* If this new key valid ... */ \ - if ( xNewKey.is () ) \ - { \ - AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\txNewkey is valid ...\n" ) \ - /* Get information about supported services. */ \ - seqServiceNames = CLASS::impl_getStaticSupportedServiceNames() ; \ - pArray = seqServiceNames.getArray() ; \ - nLength = seqServiceNames.getLength() ; \ - nCounter = 0 ; \ - \ - AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\tloop ..." ) \ - /* Then set this information on this key. */ \ - for ( nCounter = 0; nCounter < nLength; ++nCounter ) \ - { \ - xNewKey->createKey( pArray [nCounter] ); \ - } \ - AS_DBG_OUT ( " OK\n" ) \ - \ - /* Result of this operations = OK. */ \ - bReturn = sal_True ; \ - } \ - AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\t... leave xNewKey\n" ) \ - } \ - AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\t... leave xKey\n" ) \ - } \ - catch( InvalidRegistryException& ) \ - { \ - AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\tInvalidRegistryException detected!!!\n" ) \ - bReturn = sal_False ; \ - } \ - AS_DBG_OUT ( "\tCOMPONENT_INFO():\t[end]\n" ) - //****************************************************************************************************************************** #define CREATEFACTORY_ONEINSTANCE(CLASS) \ \ @@ -217,53 +164,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_ *ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ; } -//______________________________________________________________________________________________________________ -// write component info to registry -//______________________________________________________________________________________________________________ - -extern "C" sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/ , - void* pRegistryKey ) -{ - AS_DBG_OUT ( "component_writeInfo():\t[start]\n" ) - - // Set default return value for this operation - if it failed. - sal_Bool bReturn = sal_False ; - - if ( pRegistryKey != NULL ) - { - AS_DBG_OUT ( "component_writeInfo():\t\tpRegistryKey is valid ... enter scope\n" ) - - // Define variables for following macros! - // bReturn is set automaticly. - Reference< XRegistryKey > xKey( reinterpret_cast< XRegistryKey* >( pRegistryKey ) ) ; - Reference< XRegistryKey > xNewKey ; - Sequence< OUString > seqServiceNames ; - const OUString* pArray ; - sal_Int32 nLength ; - sal_Int32 nCounter ; - OUString sKeyName ; - - //============================================================================= - // Add new macro line to register new services. - // - // !!! ATTENTION !!! - // Write no ";" at end of line! (see macro) - //============================================================================= - COMPONENT_INFO ( FrameControl ) - COMPONENT_INFO ( ProgressBar ) - COMPONENT_INFO ( ProgressMonitor ) - COMPONENT_INFO ( StatusIndicator ) - //============================================================================= - - AS_DBG_OUT ( "component_writeInfo():\t\t... leave pRegistryKey scope\n" ) - } - - AS_DBG_OUT ( "component_writeInfo():\t[end]\n" ) - - // Return with result of this operation. - return bReturn ; -} - //______________________________________________________________________________________________________________ // create right component factory //______________________________________________________________________________________________________________ diff --git a/UnoControls/util/ctl.component b/UnoControls/util/ctl.component new file mode 100644 index 000000000000..32901f529c8b --- /dev/null +++ b/UnoControls/util/ctl.component @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + diff --git a/UnoControls/util/makefile.mk b/UnoControls/util/makefile.mk index aacddb23c0ad..73617d24452c 100644 --- a/UnoControls/util/makefile.mk +++ b/UnoControls/util/makefile.mk @@ -59,3 +59,11 @@ SHL1LIBS= $(LIB1TARGET) # --- Targets ------------------------------------------------------ .INCLUDE : target.mk + +ALLTAR : $(MISC)/ctl.component + +$(MISC)/ctl.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + ctl.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt ctl.component diff --git a/accessibility/bridge/org/openoffice/accessibility/AccessBridge.java b/accessibility/bridge/org/openoffice/accessibility/AccessBridge.java index 454cd15154d4..ec479fb3949d 100755 --- a/accessibility/bridge/org/openoffice/accessibility/AccessBridge.java +++ b/accessibility/bridge/org/openoffice/accessibility/AccessBridge.java @@ -142,11 +142,6 @@ public class AccessBridge { return xSingleServiceFactory; } - public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) { - return FactoryHelper.writeRegistryServiceInfo(AccessBridge.class.getName(), - _AccessBridge._serviceName, regKey); - } - static public class _AccessBridge implements XTopWindowListener, XInitialization, XComponent { static final String _serviceName = "com.sun.star.accessibility.AccessBridge"; diff --git a/accessibility/bridge/org/openoffice/accessibility/java_uno_accessbridge.component b/accessibility/bridge/org/openoffice/accessibility/java_uno_accessbridge.component new file mode 100644 index 000000000000..5fc897f2d5aa --- /dev/null +++ b/accessibility/bridge/org/openoffice/accessibility/java_uno_accessbridge.component @@ -0,0 +1,34 @@ + + + + + + + + diff --git a/accessibility/bridge/org/openoffice/accessibility/makefile.mk b/accessibility/bridge/org/openoffice/accessibility/makefile.mk index 9510a3156a59..1fa29f5bfcb1 100755 --- a/accessibility/bridge/org/openoffice/accessibility/makefile.mk +++ b/accessibility/bridge/org/openoffice/accessibility/makefile.mk @@ -53,3 +53,10 @@ CUSTOMMANIFESTFILE = manifest .INCLUDE : target.mk +ALLTAR : $(MISC)/java_uno_accessbridge.component + +$(MISC)/java_uno_accessbridge.component .ERRREMOVE : \ + $(SOLARENV)/bin/createcomponent.xslt java_uno_accessbridge.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_JAVA)$(JARTARGET)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt java_uno_accessbridge.component diff --git a/accessibility/prj/d.lst b/accessibility/prj/d.lst index f61319551e41..662373c7c487 100644 --- a/accessibility/prj/d.lst +++ b/accessibility/prj/d.lst @@ -5,4 +5,4 @@ ..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\*.res ..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT% ..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib - +..\%__SRC%\misc\java_uno_accessbridge.component %_DEST%\xml\java_uno_accessbridge.component diff --git a/basctl/prj/d.lst b/basctl/prj/d.lst index d05ff35bdabc..b3ded50b6bbe 100644 --- a/basctl/prj/d.lst +++ b/basctl/prj/d.lst @@ -21,3 +21,4 @@ mkdir: %_DEST%\inc%_EXT%\basctl ..\uiconfig\basicide\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\BasicIDE\menubar\*.xml ..\uiconfig\basicide\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\BasicIDE\toolbar\*.xml ..\uiconfig\basicide\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\BasicIDE\statusbar\*.xml +..\%__SRC%\misc\basctl.component %_DEST%\xml%_EXT%\basctl.component diff --git a/basctl/source/basicide/register.cxx b/basctl/source/basicide/register.cxx index 0ee179dc1aa6..724ee765c254 100644 --- a/basctl/source/basicide/register.cxx +++ b/basctl/source/basicide/register.cxx @@ -52,28 +52,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( *ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ; } -SAL_DLLPUBLIC_EXPORT -sal_Bool SAL_CALL component_writeInfo( void* pServiceManager , - void* pRegistryKey ) -{ - (void)pServiceManager; - - Reference< ::registry::XRegistryKey > - xKey( reinterpret_cast< ::registry::XRegistryKey* >( pRegistryKey ) ) ; - - OUString aDelimiter( RTL_CONSTASCII_USTRINGPARAM("/") ); - OUString aUnoServices( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ); - - sal_Int32 i; - Reference< ::registry::XRegistryKey > xNewKey; - xNewKey = xKey->createKey( aDelimiter + SIDEModel::getImplementationName_Static() + aUnoServices ); - Sequence< OUString > aServices = SIDEModel::getSupportedServiceNames_Static(); - for(i = 0; i < aServices.getLength(); i++ ) - xNewKey->createKey( aServices.getConstArray()[i] ); - - return sal_True; -} - SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/basctl/util/basctl.component b/basctl/util/basctl.component new file mode 100644 index 000000000000..f101deaf28be --- /dev/null +++ b/basctl/util/basctl.component @@ -0,0 +1,34 @@ + + + + + + + + diff --git a/basctl/util/basctl.map b/basctl/util/basctl.map index 80359606ccc8..83193fe176fa 100755 --- a/basctl/util/basctl.map +++ b/basctl/util/basctl.map @@ -4,7 +4,6 @@ UDK_3_0_0 { basicide_macro_organizer; basicide_handle_basic_error; component_getImplementationEnvironment; - component_writeInfo; component_getFactory; local: *; diff --git a/basctl/util/makefile.mk b/basctl/util/makefile.mk index 47de65cc58c0..b33fa3f1d721 100644 --- a/basctl/util/makefile.mk +++ b/basctl/util/makefile.mk @@ -103,3 +103,11 @@ RESLIB1SRSFILES= $(SRSFILELIST) .ENDIF # "$(header)" == "" + +ALLTAR : $(MISC)/basctl.component + +$(MISC)/basctl.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + basctl.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt basctl.component diff --git a/embedserv/prj/d.lst b/embedserv/prj/d.lst index 3765f7d97a96..e01fbabf84e0 100755 --- a/embedserv/prj/d.lst +++ b/embedserv/prj/d.lst @@ -1 +1,2 @@ ..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\*.dll +..\%__SRC%\misc\emser.component %_DEST%\xml%_EXT%\emser.component diff --git a/embedserv/source/embed/register.cxx b/embedserv/source/embed/register.cxx index 320579f502fc..8df0b103ec55 100755 --- a/embedserv/source/embed/register.cxx +++ b/embedserv/source/embed/register.cxx @@ -95,34 +95,6 @@ void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServic return pRet; } -sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, void * pRegistryKey ) -{ - if (pRegistryKey) - { - try - { - uno::Reference< registry::XRegistryKey > xKey( reinterpret_cast< registry::XRegistryKey* >( pRegistryKey ) ); - - uno::Reference< registry::XRegistryKey > xNewKey; - - xNewKey = xKey->createKey( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + - EmbedServer_getImplementationName() + - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) ); - - uno::Sequence< ::rtl::OUString > rServices = EmbedServer_getSupportedServiceNames(); - for( sal_Int32 ind = 0; ind < rServices.getLength(); ind++ ) - xNewKey->createKey( rServices.getConstArray()[ind] ); - - return sal_True; - } - catch (registry::InvalidRegistryException &) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - } - } - return sal_False; -} - } // extern "C" // Fix strange warnings about some @@ -130,4 +102,4 @@ sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, void * pRegis // warning C4505: 'xxx' : unreferenced local function has been removed #if defined(_MSC_VER) #pragma warning(disable: 4505) -#endif \ No newline at end of file +#endif diff --git a/embedserv/util/emser.component b/embedserv/util/emser.component new file mode 100644 index 000000000000..682ad1c31cc7 --- /dev/null +++ b/embedserv/util/emser.component @@ -0,0 +1,34 @@ + + + + + + + + diff --git a/embedserv/util/exports.dxp b/embedserv/util/exports.dxp index 9630d7e06768..f0e1c69934bc 100755 --- a/embedserv/util/exports.dxp +++ b/embedserv/util/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/embedserv/util/makefile.mk b/embedserv/util/makefile.mk index 45e3e4698804..5af210d96029 100755 --- a/embedserv/util/makefile.mk +++ b/embedserv/util/makefile.mk @@ -94,3 +94,11 @@ DEF1EXPORTFILE= exports.dxp .INCLUDE : target.mk + +ALLTAR : $(MISC)/emser.component + +$(MISC)/emser.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + emser.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt emser.component diff --git a/extensions/prj/d.lst b/extensions/prj/d.lst index ecfe0ef9abcd..5b974816cf21 100644 --- a/extensions/prj/d.lst +++ b/extensions/prj/d.lst @@ -22,6 +22,7 @@ mkdir: %_DEST%\bin%_EXT%\so ..\%__SRC%\bin\npsoplugin_so.dll %_DEST%\bin%_EXT%\so\npsoplugin.dll ..\%__SRC%\bin\x64\so_activex.dll %_DEST%\bin%_EXT%\so_activex_x64.dll ..\%__SRC%\bin\mdibundle.zip %_DEST%\bin%_EXT%\mdibundle.zip +..\%__SRC%\misc\oleautobridge.component %_DEST%\xml%_EXT%\oleautobridge.component ..\source\bibliography\uiconfig\sbibliography\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sbibliography\menubar\*.xml @@ -39,3 +40,19 @@ mkdir: %_DEST%\xml%_EXT%\registry\spool\org\openoffice\Office\Logging ..\%__SRC%\misc\registry\spool\org\openoffice\Office\Logging\*.xcu %_DEST%\xml%_EXT%\registry\spool\org\openoffice\Office\Logging ..\%__SRC%\bin\*.oxt %_DEST%\pck%_EXT%\* +..\%__SRC%\misc\abp.component %_DEST%\xml%_EXT%\abp.component +..\%__SRC%\misc\bib.component %_DEST%\xml%_EXT%\bib.component +..\%__SRC%\misc\dbp.component %_DEST%\xml%_EXT%\dbp.component +..\%__SRC%\misc\ldapbe2.component %_DEST%\xml%_EXT%\ldapbe2.component +..\%__SRC%\misc\log.component %_DEST%\xml%_EXT%\log.component +..\%__SRC%\misc\oooimprovecore.component %_DEST%\xml%_EXT%\oooimprovecore.component +..\%__SRC%\misc\oooimprovement.component %_DEST%\xml%_EXT%\oooimprovement.component +..\%__SRC%\misc\pcr.component %_DEST%\xml%_EXT%\pcr.component +..\%__SRC%\misc\pl.component %_DEST%\xml%_EXT%\pl.component +..\%__SRC%\misc\preload.component %_DEST%\xml%_EXT%\preload.component +..\%__SRC%\misc\res.component %_DEST%\xml%_EXT%\res.component +..\%__SRC%\misc\scn.component %_DEST%\xml%_EXT%\scn.component +..\%__SRC%\misc\updatefeed.component %_DEST%\xml%_EXT%\updatefeed.component +..\%__SRC%\misc\updchk.component %_DEST%\xml%_EXT%\updchk.component +..\%__SRC%\misc\updchk.uno.component %_DEST%\xml%_EXT%\updchk.uno.component +..\%__SRC%\misc\xmx.component %_DEST%\xml%_EXT%\xmx.component diff --git a/extensions/source/abpilot/abp.component b/extensions/source/abpilot/abp.component new file mode 100644 index 000000000000..a07cef986219 --- /dev/null +++ b/extensions/source/abpilot/abp.component @@ -0,0 +1,34 @@ + + + + + + + + diff --git a/extensions/source/abpilot/abpservices.cxx b/extensions/source/abpilot/abpservices.cxx index 8997ce335676..1cb327f73c72 100644 --- a/extensions/source/abpilot/abpservices.cxx +++ b/extensions/source/abpilot/abpservices.cxx @@ -65,27 +65,6 @@ component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -//--------------------------------------------------------------------------------------- -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void* pServiceManager, - void* pRegistryKey - ) -{ - if (pRegistryKey) - try - { - return ::abp::OModule::writeComponentInfos( - static_cast(pServiceManager), - static_cast(pRegistryKey)); - } - catch (InvalidRegistryException& ) - { - OSL_ASSERT("abp::component_writeInfo: could not create a registry key (InvalidRegistryException) !"); - } - - return sal_False; -} - //--------------------------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, diff --git a/extensions/source/abpilot/exports.dxp b/extensions/source/abpilot/exports.dxp index 9630d7e06768..f0e1c69934bc 100644 --- a/extensions/source/abpilot/exports.dxp +++ b/extensions/source/abpilot/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/extensions/source/abpilot/makefile.mk b/extensions/source/abpilot/makefile.mk index 19477e1b6b2b..86bc5c68a7df 100644 --- a/extensions/source/abpilot/makefile.mk +++ b/extensions/source/abpilot/makefile.mk @@ -104,3 +104,11 @@ DEF1EXPORTFILE= exports.dxp # --- Targets ------------------------------------------------------ .INCLUDE : target.mk + +ALLTAR : $(MISC)/abp.component + +$(MISC)/abp.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + abp.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt abp.component diff --git a/extensions/source/bibliography/bib.component b/extensions/source/bibliography/bib.component new file mode 100644 index 000000000000..98627854dffa --- /dev/null +++ b/extensions/source/bibliography/bib.component @@ -0,0 +1,35 @@ + + + + + + + + + diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx index 91356a0d1074..64262d2356a9 100644 --- a/extensions/source/bibliography/bibload.cxx +++ b/extensions/source/bibliography/bibload.cxx @@ -225,36 +225,6 @@ extern "C" *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } - sal_Bool SAL_CALL component_writeInfo( void * //pServiceManager - , registry::XRegistryKey * pRegistryKey ) - { - try - { - rtl::OUString sKey = rtl::OUString::createFromAscii("/"); - sKey += BibliographyLoader::getImplementationName_Static(); - //creates the impl key: /com.sun.star.extensions.Bibliography - Reference< registry::XRegistryKey > xImplKey = pRegistryKey->createKey(sKey); - - - //sKey += rtl::OUString::createFromAscii("/UNO/SERVICES"); - Reference< registry::XRegistryKey > xNewKey = xImplKey->createKey( C2U("/UNO/SERVICES") ); - Sequence< rtl::OUString > aServices = BibliographyLoader::getSupportedServiceNames_Static(); - for( INT32 i = 0; i < aServices.getLength(); i++ ) - xNewKey->createKey( aServices.getConstArray()[i]); - xNewKey = xImplKey->createKey( C2U("/UNO/Loader")); - - Reference< registry::XRegistryKey > xPatternKey = xImplKey->createKey( C2U("/Loader/Pattern" )); - xPatternKey->setAsciiValue( C2U( ".component:Bibliography/*" ) ); - - return sal_True; - } - catch (Exception &) - { - return sal_False; - } - } - - void * SAL_CALL component_getFactory( const sal_Char * pImplName, XMultiServiceFactory * pServiceManager, void * /*pRegistryKey*/ ) { diff --git a/extensions/source/bibliography/makefile.mk b/extensions/source/bibliography/makefile.mk index f25dce11045b..e24c32237533 100644 --- a/extensions/source/bibliography/makefile.mk +++ b/extensions/source/bibliography/makefile.mk @@ -89,3 +89,11 @@ DEF1NAME= $(SHL1TARGET) .INCLUDE : target.mk + +ALLTAR : $(MISC)/bib.component + +$(MISC)/bib.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + bib.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt bib.component diff --git a/extensions/source/config/ldap/componentdef.cxx b/extensions/source/config/ldap/componentdef.cxx index 0fd917d2ff9e..e76314ba56f2 100644 --- a/extensions/source/config/ldap/componentdef.cxx +++ b/extensions/source/config/ldap/componentdef.cxx @@ -62,13 +62,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( } //------------------------------------------------------------------------------ -extern "C" sal_Bool SAL_CALL component_writeInfo(void *aServiceManager, - void *aRegistryKey) { - return cppu::component_writeInfoHelper( - aServiceManager, aRegistryKey, kImplementations_entries); -} -//------------------------------------------------------------------------------ - extern "C" void *component_getFactory(const sal_Char *aImplementationName, void *aServiceManager, void *aRegistryKey) { diff --git a/extensions/source/config/ldap/exports.dxp b/extensions/source/config/ldap/exports.dxp index 9630d7e06768..f0e1c69934bc 100644 --- a/extensions/source/config/ldap/exports.dxp +++ b/extensions/source/config/ldap/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/extensions/source/config/ldap/ldapbe2.component b/extensions/source/config/ldap/ldapbe2.component new file mode 100644 index 000000000000..071064d1c823 --- /dev/null +++ b/extensions/source/config/ldap/ldapbe2.component @@ -0,0 +1,34 @@ + + + + + + + + diff --git a/extensions/source/config/ldap/makefile.mk b/extensions/source/config/ldap/makefile.mk index a27cb39b6225..d35e2428ca31 100644 --- a/extensions/source/config/ldap/makefile.mk +++ b/extensions/source/config/ldap/makefile.mk @@ -95,3 +95,11 @@ DEF1DES=Configuration: LDAP User Profile Backend .INCLUDE : target.mk .INCLUDE : $(PRJ)$/util$/target.pmk + +ALLTAR : $(MISC)/ldapbe2.component + +$(MISC)/ldapbe2.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + ldapbe2.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt ldapbe2.component diff --git a/extensions/source/dbpilots/dbp.component b/extensions/source/dbpilots/dbp.component new file mode 100644 index 000000000000..84ec98713b2a --- /dev/null +++ b/extensions/source/dbpilots/dbp.component @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + diff --git a/extensions/source/dbpilots/dbpservices.cxx b/extensions/source/dbpilots/dbpservices.cxx index 28e55e1e8900..6cb77dde19bb 100644 --- a/extensions/source/dbpilots/dbpservices.cxx +++ b/extensions/source/dbpilots/dbpservices.cxx @@ -69,27 +69,6 @@ component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -//--------------------------------------------------------------------------------------- -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void* pServiceManager, - void* pRegistryKey - ) -{ - if (pRegistryKey) - try - { - return ::dbp::OModule::writeComponentInfos( - static_cast(pServiceManager), - static_cast(pRegistryKey)); - } - catch (InvalidRegistryException& ) - { - OSL_ASSERT("dbp::component_writeInfo: could not create a registry key (InvalidRegistryException) !"); - } - - return sal_False; -} - //--------------------------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, diff --git a/extensions/source/dbpilots/makefile.mk b/extensions/source/dbpilots/makefile.mk index b5831e5fda0f..e37ab0a546ac 100644 --- a/extensions/source/dbpilots/makefile.mk +++ b/extensions/source/dbpilots/makefile.mk @@ -101,3 +101,11 @@ DEF1NAME= $(SHL1TARGET) # --- Targets ------------------------------------------------------ .INCLUDE : target.mk + +ALLTAR : $(MISC)/dbp.component + +$(MISC)/dbp.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + dbp.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt dbp.component diff --git a/extensions/source/inc/componentmodule.cxx b/extensions/source/inc/componentmodule.cxx index 6b08c46ff13b..f72458b01ec2 100644 --- a/extensions/source/inc/componentmodule.cxx +++ b/extensions/source/inc/componentmodule.cxx @@ -237,54 +237,6 @@ namespace COMPMOD_NAMESPACE } } - //-------------------------------------------------------------------------- - sal_Bool OModule::writeComponentInfos( - const Reference< XMultiServiceFactory >& /*_rxServiceManager*/, - const Reference< XRegistryKey >& _rxRootKey) - { - OSL_ENSURE(_rxRootKey.is(), "OModule::writeComponentInfos : invalid argument !"); - - if (!s_pImplementationNames) - { - OSL_ASSERT("OModule::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, - "OModule::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()), - "OModule::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 xNewKey( _rxRootKey->createKey(aMainKeyName) ); - - const ::rtl::OUString* pService = pServices->getConstArray(); - for (sal_Int32 j=0; jgetLength(); ++j, ++pService) - xNewKey->createKey(*pService); - } - catch(Exception&) - { - OSL_ASSERT("OModule::writeComponentInfos : something went wrong while creating the keys !"); - return sal_False; - } - } - - return sal_True; - } - //-------------------------------------------------------------------------- Reference< XInterface > OModule::getComponentFactory( const ::rtl::OUString& _rImplementationName, diff --git a/extensions/source/inc/componentmodule.hxx b/extensions/source/inc/componentmodule.hxx index 09fd0807639f..88d6e5cf99c0 100644 --- a/extensions/source/inc/componentmodule.hxx +++ b/extensions/source/inc/componentmodule.hxx @@ -121,21 +121,6 @@ typedef ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleService static void revokeComponent( const ::rtl::OUString& _rImplementationName); - /** write the registration information of all known components -

writes the registration information of all components which are currently registered into the - specified registry.

-

Usually used from within component_writeInfo.

- @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.

Usually used from within component_getFactory.

@param _rxServiceManager diff --git a/extensions/source/logging/log.component b/extensions/source/logging/log.component new file mode 100644 index 000000000000..4dd2db56c3cc --- /dev/null +++ b/extensions/source/logging/log.component @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/extensions/source/logging/makefile.mk b/extensions/source/logging/makefile.mk index 4a1fa9813cb0..1436576e89ba 100644 --- a/extensions/source/logging/makefile.mk +++ b/extensions/source/logging/makefile.mk @@ -74,3 +74,11 @@ SHL1VERSIONMAP=$(SOLARENV)/src/component.map .INCLUDE : target.mk + +ALLTAR : $(MISC)/log.component + +$(MISC)/log.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + log.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt log.component diff --git a/extensions/source/ole/makefile.mk b/extensions/source/ole/makefile.mk index ad4ecee72c82..806cd027eaae 100644 --- a/extensions/source/ole/makefile.mk +++ b/extensions/source/ole/makefile.mk @@ -129,3 +129,10 @@ DEF2EXPORTFILE=$(TARGET).dxp .INCLUDE : target.mk +ALLTAR : $(MISC)/oleautobridge.component + +$(MISC)/oleautobridge.component .ERRREMOVE : \ + $(SOLARENV)/bin/createcomponent.xslt oleautobridge.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt oleautobridge.component diff --git a/extensions/source/ole/oleautobridge.component b/extensions/source/ole/oleautobridge.component new file mode 100644 index 000000000000..6f5309e42ad9 --- /dev/null +++ b/extensions/source/ole/oleautobridge.component @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/extensions/source/ole/oleautobridge.uno.dxp b/extensions/source/ole/oleautobridge.uno.dxp index e7947188aa92..1f26fd019c1c 100644 --- a/extensions/source/ole/oleautobridge.uno.dxp +++ b/extensions/source/ole/oleautobridge.uno.dxp @@ -1,4 +1,3 @@ -component_writeInfo @100 component_getFactory @101 component_getImplementationEnvironment @102 component_canUnload @103 diff --git a/extensions/source/ole/servreg.cxx b/extensions/source/ole/servreg.cxx index 17fc24e9a08c..f5d6c8080a15 100644 --- a/extensions/source/ole/servreg.cxx +++ b/extensions/source/ole/servreg.cxx @@ -119,47 +119,6 @@ extern "C" void * SAL_CALL component_getFactory( } -extern "C" sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, void * pRegistryKey ) -{ - if (pRegistryKey) - { - try - { - //deprecated - Reference xNewKey = - reinterpret_cast( pRegistryKey)->createKey(reinterpret_cast(L"/com.sun.star.comp.ole.OleConverter2/UNO/SERVICES")); - xNewKey->createKey(reinterpret_cast(L"com.sun.star.bridge.OleBridgeSupplier2")); - - xNewKey->createKey(reinterpret_cast(L"com.sun.star.bridge.oleautomation.BridgeSupplier")); - - //deprecated - xNewKey = - reinterpret_cast( pRegistryKey)->createKey(reinterpret_cast(L"/com.sun.star.comp.ole.OleConverterVar1/UNO/SERVICES")); - xNewKey->createKey(reinterpret_cast(L"com.sun.star.bridge.OleBridgeSupplierVar1")); - - //deprecated - xNewKey = - reinterpret_cast( pRegistryKey)->createKey(reinterpret_cast(L"/com.sun.star.comp.ole.OleClient/UNO/SERVICES")); - xNewKey->createKey(reinterpret_cast(L"com.sun.star.bridge.OleObjectFactory")); - - xNewKey->createKey(reinterpret_cast(L"com.sun.star.bridge.oleautomation.Factory")); - //deprecated - xNewKey = - reinterpret_cast( pRegistryKey)->createKey(reinterpret_cast(L"/com.sun.star.comp.ole.OleServer/UNO/SERVICES")); - xNewKey->createKey(reinterpret_cast(L"com.sun.star.bridge.OleApplicationRegistration")); - - xNewKey->createKey(reinterpret_cast(L"com.sun.star.bridge.oleautomation.ApplicationRegistration")); - - return sal_True; - } - catch (InvalidRegistryException &) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - } - } - return sal_False; -} - extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) { diff --git a/extensions/source/oooimprovecore/makefile.mk b/extensions/source/oooimprovecore/makefile.mk index 97e130c3a644..f92804dbf261 100644 --- a/extensions/source/oooimprovecore/makefile.mk +++ b/extensions/source/oooimprovecore/makefile.mk @@ -75,3 +75,11 @@ SHL1VERSIONMAP=$(SOLARENV)/src/component.map .INCLUDE : target.mk + +ALLTAR : $(MISC)/oooimprovecore.component + +$(MISC)/oooimprovecore.component .ERRREMOVE : \ + $(SOLARENV)/bin/createcomponent.xslt oooimprovecore.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt oooimprovecore.component diff --git a/extensions/source/oooimprovecore/oooimprovecore.component b/extensions/source/oooimprovecore/oooimprovecore.component new file mode 100644 index 000000000000..58bdaf37c2c5 --- /dev/null +++ b/extensions/source/oooimprovecore/oooimprovecore.component @@ -0,0 +1,34 @@ + + + + + + + + diff --git a/extensions/source/oooimprovement/makefile.mk b/extensions/source/oooimprovement/makefile.mk index 6e5d7ab0d6a2..16e3f12f126c 100644 --- a/extensions/source/oooimprovement/makefile.mk +++ b/extensions/source/oooimprovement/makefile.mk @@ -102,3 +102,11 @@ $(SPOOLDIR)$/$(PACKAGEDIR)$/Jobs$/Jobs-oooimprovement.xcu : $(XCU_SOURCEDIR)$/Jo $(SPOOLDIR)$/$(PACKAGEDIR)$/Logging$/Logging-oooimprovement.xcu : $(XCU_SOURCEDIR)$/Logging.xcu @-$(MKDIRHIER) $(@:d) @$(COPY) $< $@ + +ALLTAR : $(MISC)/oooimprovement.component + +$(MISC)/oooimprovement.component .ERRREMOVE : \ + $(SOLARENV)/bin/createcomponent.xslt oooimprovement.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt oooimprovement.component diff --git a/extensions/source/oooimprovement/oooimprovement.component b/extensions/source/oooimprovement/oooimprovement.component new file mode 100644 index 000000000000..ac4d6cca1584 --- /dev/null +++ b/extensions/source/oooimprovement/oooimprovement.component @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + diff --git a/extensions/source/oooimprovement/oooimprovement_exports.cxx b/extensions/source/oooimprovement/oooimprovement_exports.cxx index 147089dd203c..b351f84680d7 100644 --- a/extensions/source/oooimprovement/oooimprovement_exports.cxx +++ b/extensions/source/oooimprovement/oooimprovement_exports.cxx @@ -65,28 +65,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment(const sal_Char** env_type_name, uno_Environment**) { *env_type_name = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } - sal_Bool SAL_CALL component_writeInfo(void*, void* p_reg_key) - { - if (!p_reg_key) return sal_False; - try - { - Reference reg_key(reinterpret_cast(p_reg_key), UNO_QUERY); - writeInfo(reg_key, - CoreController::getImplementationName_static(), - CoreController::getSupportedServiceNames_static()[0]); - writeInfo(reg_key, - OnLogRotateJob::getImplementationName_static(), - OnLogRotateJob::getSupportedServiceNames_static()[0]); - writeInfo(reg_key, - InviteJob::getImplementationName_static(), - InviteJob::getSupportedServiceNames_static()[0]); - return sal_True; - } - catch(const InvalidRegistryException&) - { OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); } - return sal_False; - } - void* SAL_CALL component_getFactory(const sal_Char* pImplName, void* pServiceManager, void*) { if ( !pServiceManager || !pImplName ) return 0; diff --git a/extensions/source/plugin/base/service.cxx b/extensions/source/plugin/base/service.cxx index de74d05060db..21389caa2bbd 100644 --- a/extensions/source/plugin/base/service.cxx +++ b/extensions/source/plugin/base/service.cxx @@ -54,33 +54,6 @@ extern "C" { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } - sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pXUnoKey ) - { - if( pXUnoKey ) - { - try - { - Reference< ::com::sun::star::registry::XRegistryKey > xKey( reinterpret_cast< ::com::sun::star::registry::XRegistryKey* >( pXUnoKey ) ); - - ::rtl::OUString aImplName = ::rtl::OUString::createFromAscii( "/" ); - aImplName += XPluginManager_Impl::getImplementationName_Static(); - aImplName += ::rtl::OUString::createFromAscii( "/UNO/SERVICES/com.sun.star.plugin.PluginManager" ); - xKey->createKey( aImplName ); - - aImplName = ::rtl::OUString::createFromAscii( "/" ); - aImplName += PluginModel::getImplementationName_Static(); - aImplName += ::rtl::OUString::createFromAscii( "/UNO/SERVICES/com.sun.star.plugin.PluginModel" ); - xKey->createKey( aImplName ); - - return sal_True; - } - catch( ::com::sun::star::registry::InvalidRegistryException& ) - { - } - } - return sal_False; - } - void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pXUnoSMgr, diff --git a/extensions/source/plugin/util/makefile.mk b/extensions/source/plugin/util/makefile.mk index 7a8c46c01769..765941689658 100644 --- a/extensions/source/plugin/util/makefile.mk +++ b/extensions/source/plugin/util/makefile.mk @@ -107,3 +107,11 @@ SHL1STDLIBS+=$(SHL1OWNLIBS) + +ALLTAR : $(MISC)/pl.component + +$(MISC)/pl.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + pl.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt pl.component diff --git a/extensions/source/plugin/util/pl.component b/extensions/source/plugin/util/pl.component new file mode 100644 index 000000000000..4a9d98f7dc7b --- /dev/null +++ b/extensions/source/plugin/util/pl.component @@ -0,0 +1,37 @@ + + + + + + + + + + + diff --git a/extensions/source/preload/makefile.mk b/extensions/source/preload/makefile.mk index fb11a2bfd32c..8bd6226619bc 100644 --- a/extensions/source/preload/makefile.mk +++ b/extensions/source/preload/makefile.mk @@ -83,3 +83,11 @@ DEF1NAME= $(SHL1TARGET) .INCLUDE : target.mk + +ALLTAR : $(MISC)/preload.component + +$(MISC)/preload.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + preload.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt preload.component diff --git a/extensions/source/preload/preload.component b/extensions/source/preload/preload.component new file mode 100644 index 000000000000..56a8a0d7a0cf --- /dev/null +++ b/extensions/source/preload/preload.component @@ -0,0 +1,34 @@ + + + + + + + + diff --git a/extensions/source/preload/services.cxx b/extensions/source/preload/services.cxx index 39904ef7cc51..e063789e0f0c 100644 --- a/extensions/source/preload/services.cxx +++ b/extensions/source/preload/services.cxx @@ -65,27 +65,6 @@ component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -//--------------------------------------------------------------------------------------- -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void* pServiceManager, - void* pRegistryKey - ) -{ - if (pRegistryKey) - try - { - return ::preload::OModule::writeComponentInfos( - static_cast(pServiceManager), - static_cast(pRegistryKey)); - } - catch (InvalidRegistryException& ) - { - OSL_ASSERT("preload::component_writeInfo: could not create a registry key (InvalidRegistryException) !"); - } - - return sal_False; -} - //--------------------------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, diff --git a/extensions/source/propctrlr/makefile.mk b/extensions/source/propctrlr/makefile.mk index c69f47bcef1a..ebb629ae39c9 100644 --- a/extensions/source/propctrlr/makefile.mk +++ b/extensions/source/propctrlr/makefile.mk @@ -144,3 +144,11 @@ DEF1NAME= $(SHL1TARGET) .INCLUDE : target.mk + +ALLTAR : $(MISC)/pcr.component + +$(MISC)/pcr.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + pcr.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt pcr.component diff --git a/extensions/source/propctrlr/pcr.component b/extensions/source/propctrlr/pcr.component new file mode 100644 index 000000000000..2b606cc01c11 --- /dev/null +++ b/extensions/source/propctrlr/pcr.component @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/extensions/source/propctrlr/pcrservices.cxx b/extensions/source/propctrlr/pcrservices.cxx index e04169e7d90e..e515a87c1b16 100644 --- a/extensions/source/propctrlr/pcrservices.cxx +++ b/extensions/source/propctrlr/pcrservices.cxx @@ -103,27 +103,6 @@ component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -//--------------------------------------------------------------------------------------- -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void* pServiceManager, - void* pRegistryKey - ) -{ - if (pRegistryKey) - try - { - return ::pcr::PcrModule::getInstance().writeComponentInfos( - static_cast(pServiceManager), - static_cast(pRegistryKey)); - } - catch (InvalidRegistryException& ) - { - OSL_ASSERT("pcr::component_writeInfo: could not create a registry key (InvalidRegistryException) !"); - } - - return sal_False; -} - //--------------------------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, diff --git a/extensions/source/resource/exports.dxp b/extensions/source/resource/exports.dxp index 9e59e94034a6..f0e1c69934bc 100644 --- a/extensions/source/resource/exports.dxp +++ b/extensions/source/resource/exports.dxp @@ -1,3 +1,2 @@ -component_writeInfo component_getImplementationEnvironment component_getFactory diff --git a/extensions/source/resource/makefile.mk b/extensions/source/resource/makefile.mk index a89d690b7393..adeec5fd09dc 100644 --- a/extensions/source/resource/makefile.mk +++ b/extensions/source/resource/makefile.mk @@ -74,3 +74,11 @@ DEF1EXPORTFILE= exports.dxp .INCLUDE : target.mk .INCLUDE : $(PRJ)$/util$/target.pmk + +ALLTAR : $(MISC)/res.component + +$(MISC)/res.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + res.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt res.component diff --git a/extensions/source/resource/res.component b/extensions/source/resource/res.component new file mode 100644 index 000000000000..57f96609d5df --- /dev/null +++ b/extensions/source/resource/res.component @@ -0,0 +1,38 @@ + + + + + + + + + + + + diff --git a/extensions/source/resource/res_services.cxx b/extensions/source/resource/res_services.cxx index 6babbe48e8cd..7bdc684294ea 100644 --- a/extensions/source/resource/res_services.cxx +++ b/extensions/source/resource/res_services.cxx @@ -29,12 +29,7 @@ #include "precompiled_extensions.hxx" #include "res_services.hxx" -/** === begin UNO includes === **/ -#include -/** === end UNO includes === **/ - /** === begin UNO using === **/ -using ::com::sun::star::registry::XRegistryKey; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::Exception; @@ -64,43 +59,6 @@ void SAL_CALL component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, XRegistryKey * pRegistryKey ) -{ - try - { - ::std::vector< ::res::ComponentInfo > aComponentInfos( ::res::getComponentInfos() ); - for ( ::std::vector< ::res::ComponentInfo >::const_iterator loop = aComponentInfos.begin(); - loop != aComponentInfos.end(); - ++loop - ) - { - Reference< XRegistryKey > xNewKey = - pRegistryKey->createKey( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) - + loop->sImplementationName + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES" ) ) ); - - for( sal_Int32 i = 0; i < loop->aSupportedServices.getLength(); ++i ) - xNewKey->createKey( loop->aSupportedServices.getConstArray()[i]); - - if ( loop->sSingletonName.getLength() ) - { - OSL_ENSURE( loop->aSupportedServices.getLength() == 1, "singletons must support exactly one service!" ); - xNewKey = pRegistryKey->createKey( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) - + loop->sImplementationName + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SINGLETONS/" ) ) - + loop->sSingletonName ); - xNewKey->setStringValue( loop->aSupportedServices[ 0 ] ); - } - } - - return sal_True; - } - catch (Exception &) - { - // not allowed to throw an exception over the c function. - //OSL_ENSURE( sal_False, "Exception cannot register component!" ); - return sal_False; - } -} - void * SAL_CALL component_getFactory( const sal_Char * pImplName, XMultiServiceFactory * /*pServiceManager*/, void * /*pRegistryKey*/ ) { diff --git a/extensions/source/scanner/exports.dxp b/extensions/source/scanner/exports.dxp index 9630d7e06768..f0e1c69934bc 100644 --- a/extensions/source/scanner/exports.dxp +++ b/extensions/source/scanner/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/extensions/source/scanner/makefile.mk b/extensions/source/scanner/makefile.mk index ff42864e0496..519be1ff863d 100644 --- a/extensions/source/scanner/makefile.mk +++ b/extensions/source/scanner/makefile.mk @@ -98,3 +98,11 @@ DEF1EXPORTFILE=exports.dxp .INCLUDE : target.mk + +ALLTAR : $(MISC)/scn.component + +$(MISC)/scn.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + scn.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt scn.component diff --git a/extensions/source/scanner/scn.component b/extensions/source/scanner/scn.component new file mode 100644 index 000000000000..d7daf3ae36d4 --- /dev/null +++ b/extensions/source/scanner/scn.component @@ -0,0 +1,34 @@ + + + + + + + + diff --git a/extensions/source/scanner/scnserv.cxx b/extensions/source/scanner/scnserv.cxx index e7c125fe1cae..e96522002b9a 100644 --- a/extensions/source/scanner/scnserv.cxx +++ b/extensions/source/scanner/scnserv.cxx @@ -45,37 +45,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char* *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -// ----------------------- -// - component_writeInfo - -// ----------------------- - -extern "C" sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistryKey ) -{ - sal_Bool bRet = sal_False; - - if( pRegistryKey ) - { - try - { - ::rtl::OUString aImplName( '/' ); - - aImplName += ScannerManager::getImplementationName_Static(); - aImplName += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES/" ) ); - aImplName += ScannerManager::getImplementationName_Static(); - - REF( XRegistryKey ) xNewKey1( static_cast< XRegistryKey* >( pRegistryKey )->createKey( aImplName ) ); - - bRet = sal_True; - } - catch( InvalidRegistryException& ) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - } - } - - return bRet; -} - // ------------------------ // - component_getFactory - // ------------------------ diff --git a/extensions/source/svg/svguno.cxx b/extensions/source/svg/svguno.cxx index cb76e80d9319..5e4281ca2e28 100644 --- a/extensions/source/svg/svguno.cxx +++ b/extensions/source/svg/svguno.cxx @@ -60,36 +60,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -// ----------------------- -// - component_writeInfo - -// ----------------------- - -extern "C" sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistryKey ) -{ - sal_Bool bRet = sal_False; - - if( pRegistryKey ) - { - try - { - REF( NMSP_REGISTRY::XRegistryKey ) xNewKey1( - static_cast< NMSP_REGISTRY::XRegistryKey* >( pRegistryKey )->createKey( - B2UCONST( "/com.sun.star.comp.extensions.SVGWriter/UNO/SERVICES/com.sun.star.svg.SVGWriter" ) ) ); - REF( NMSP_REGISTRY::XRegistryKey ) xNewKey2( - static_cast< NMSP_REGISTRY::XRegistryKey* >( pRegistryKey )->createKey( - B2UCONST( "/com.sun.star.comp.extensions.SVGPrinter/UNO/SERVICES/com.sun.star.svg.SVGPrinter" ) ) ); - - bRet = sal_True; - } - catch( NMSP_REGISTRY::InvalidRegistryException& ) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - } - } - - return bRet; -} - // ------------------------ // - component_getFactory - // ------------------------ diff --git a/extensions/source/update/check/makefile.mk b/extensions/source/update/check/makefile.mk index 9f5f544102dd..47da869ea11e 100644 --- a/extensions/source/update/check/makefile.mk +++ b/extensions/source/update/check/makefile.mk @@ -132,3 +132,11 @@ $(SPOOLDIR)$/$(PACKAGEDIR)$/Jobs$/Jobs-onlineupdate.xcu : $(XCU_SOURCEDIR)$/Jobs @$(COPY) $< $@ # @$(PERL) transform.pl < $< > $@ + +ALLTAR : $(MISC)/updchk.uno.component + +$(MISC)/updchk.uno.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + updchk.uno.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt updchk.uno.component diff --git a/extensions/source/update/check/updatecheckjob.cxx b/extensions/source/update/check/updatecheckjob.cxx index 0c9ee46d10f0..9a87779e0999 100755 --- a/extensions/source/update/check/updatecheckjob.cxx +++ b/extensions/source/update/check/updatecheckjob.cxx @@ -388,18 +388,6 @@ component_getImplementationEnvironment( const sal_Char **aEnvTypeName, uno_Envir //------------------------------------------------------------------------------ -extern "C" sal_Bool SAL_CALL -component_writeInfo(void *pServiceManager, void *pRegistryKey) -{ - return cppu::component_writeInfoHelper( - pServiceManager, - pRegistryKey, - kImplementations_entries - ); -} - -//------------------------------------------------------------------------------ - extern "C" void * component_getFactory(const sal_Char *pszImplementationName, void *pServiceManager, void *pRegistryKey) { diff --git a/extensions/source/update/check/updchk.uno.component b/extensions/source/update/check/updchk.uno.component new file mode 100644 index 000000000000..b1eb32917eaf --- /dev/null +++ b/extensions/source/update/check/updchk.uno.component @@ -0,0 +1,37 @@ + + + + + + + + + + + diff --git a/extensions/source/update/feed/makefile.mk b/extensions/source/update/feed/makefile.mk index 7e12970ddef1..6361f20bdd73 100644 --- a/extensions/source/update/feed/makefile.mk +++ b/extensions/source/update/feed/makefile.mk @@ -62,3 +62,11 @@ DEF1NAME=$(SHL1TARGET) .INCLUDE : target.mk + +ALLTAR : $(MISC)/updatefeed.component + +$(MISC)/updatefeed.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + updatefeed.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt updatefeed.component diff --git a/extensions/source/update/feed/updatefeed.component b/extensions/source/update/feed/updatefeed.component new file mode 100644 index 000000000000..2d53ff5f9398 --- /dev/null +++ b/extensions/source/update/feed/updatefeed.component @@ -0,0 +1,34 @@ + + + + + + + + diff --git a/extensions/source/update/feed/updatefeed.cxx b/extensions/source/update/feed/updatefeed.cxx index e5eb490e29a2..12af008ee853 100644 --- a/extensions/source/update/feed/updatefeed.cxx +++ b/extensions/source/update/feed/updatefeed.cxx @@ -851,18 +851,6 @@ component_getImplementationEnvironment( const sal_Char **aEnvTypeName, uno_Envir //------------------------------------------------------------------------------ -extern "C" sal_Bool SAL_CALL -component_writeInfo(void *pServiceManager, void *pRegistryKey) -{ - return cppu::component_writeInfoHelper( - pServiceManager, - pRegistryKey, - kImplementations_entries - ); -} - -//------------------------------------------------------------------------------ - extern "C" void * component_getFactory(const sal_Char *pszImplementationName, void *pServiceManager, void *pRegistryKey) { diff --git a/extensions/source/update/ui/makefile.mk b/extensions/source/update/ui/makefile.mk index c4826efba9ca..5ea6994d3d22 100644 --- a/extensions/source/update/ui/makefile.mk +++ b/extensions/source/update/ui/makefile.mk @@ -72,3 +72,11 @@ DEF1NAME=$(SHL1TARGET) .INCLUDE : target.mk + +ALLTAR : $(MISC)/updchk.component + +$(MISC)/updchk.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + updchk.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt updchk.component diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx index a2a8c31908fc..a6fe8fb27d32 100644 --- a/extensions/source/update/ui/updatecheckui.cxx +++ b/extensions/source/update/ui/updatecheckui.cxx @@ -1059,18 +1059,6 @@ component_getImplementationEnvironment( const sal_Char **aEnvTypeName, uno_Envir //------------------------------------------------------------------------------ -extern "C" sal_Bool SAL_CALL -component_writeInfo(void *pServiceManager, void *pRegistryKey) -{ - return cppu::component_writeInfoHelper( - pServiceManager, - pRegistryKey, - kImplementations_entries - ); -} - -//------------------------------------------------------------------------------ - extern "C" void * component_getFactory(const sal_Char *pszImplementationName, void *pServiceManager, void *pRegistryKey) { diff --git a/extensions/source/update/ui/updchk.component b/extensions/source/update/ui/updchk.component new file mode 100644 index 000000000000..bd533e30d1f3 --- /dev/null +++ b/extensions/source/update/ui/updchk.component @@ -0,0 +1,34 @@ + + + + + + + + diff --git a/extensions/source/xmlextract/makefile.mk b/extensions/source/xmlextract/makefile.mk index 0a021027f4b4..fa54df738b58 100644 --- a/extensions/source/xmlextract/makefile.mk +++ b/extensions/source/xmlextract/makefile.mk @@ -63,3 +63,11 @@ SHL1LIBS= $(SLB)$/$(TARGET).lib # --- Targets ---------------------------------- .INCLUDE : target.mk + +ALLTAR : $(MISC)/xmx.component + +$(MISC)/xmx.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + xmx.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt xmx.component diff --git a/extensions/source/xmlextract/xmx.component b/extensions/source/xmlextract/xmx.component new file mode 100644 index 000000000000..456ff33b6c06 --- /dev/null +++ b/extensions/source/xmlextract/xmx.component @@ -0,0 +1,34 @@ + + + + + + + + diff --git a/extensions/source/xmlextract/xmxuno.cxx b/extensions/source/xmlextract/xmxuno.cxx index ba4044a54e6b..98d11238fb73 100644 --- a/extensions/source/xmlextract/xmxuno.cxx +++ b/extensions/source/xmlextract/xmxuno.cxx @@ -52,27 +52,6 @@ void SAL_CALL component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } //================================================================================================== -sal_Bool SAL_CALL component_writeInfo( - void * /*pServiceManager*/, void * pRegistryKey ) -{ - if (pRegistryKey) - { - try - { - REF( NMSP_REGISTRY::XRegistryKey ) xNewKey( - reinterpret_cast< NMSP_REGISTRY::XRegistryKey * >( pRegistryKey )->createKey( - NMSP_RTL::OUString( RTL_CONSTASCII_USTRINGPARAM("/com.sun.star.comp.io.XMLExtractor/UNO/SERVICES/com.sun.star.io.XMLExtractor") ) ) ); - - return sal_True; - } - catch (NMSP_REGISTRY::InvalidRegistryException &) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - } - } - return sal_False; -} -//================================================================================================== void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) { 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/source/inc/forms_module.hxx b/forms/source/inc/forms_module.hxx index 6655fb750e8d..912323d93194 100644 --- a/forms/source/inc/forms_module.hxx +++ b/forms/source/inc/forms_module.hxx @@ -101,21 +101,6 @@ namespace FORMS_MODULE_NAMESPACE static void revokeComponent( const ::rtl::OUString& _rImplementationName); - /** write the registration information of all known components -

writes the registration information of all components which are currently registered into the - specified registry.

-

Usually used from within component_writeInfo.

- @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.

Usually used from within component_getFactory.

@param _rxServiceManager diff --git a/forms/source/inc/forms_module_impl.hxx b/forms/source/inc/forms_module_impl.hxx index a2c0e50e55e7..d10527075ae3 100644 --- a/forms/source/inc/forms_module_impl.hxx +++ b/forms/source/inc/forms_module_impl.hxx @@ -106,54 +106,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_ASSERT("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 xNewKey( _rxRootKey->createKey(aMainKeyName) ); - - const ::rtl::OUString* pService = pServices->getConstArray(); - for (sal_Int32 j=0; jgetLength(); ++j, ++pService) - xNewKey->createKey(*pService); - } - catch(Exception&) - { - OSL_ASSERT("OFormsModule::writeComponentInfos : something went wrong while creating the keys !"); - return sal_False; - } - } - - return sal_True; - } - //-------------------------------------------------------------------------- Reference< XInterface > OFormsModule::getComponentFactory( const ::rtl::OUString& _rImplementationName, diff --git a/forms/source/misc/services.cxx b/forms/source/misc/services.cxx index dbda0ae3896d..9a38d49e3e67 100644 --- a/forms/source/misc/services.cxx +++ b/forms/source/misc/services.cxx @@ -283,22 +283,6 @@ void ensureClassInfos() } -//--------------------------------------------------------------------------------------- -void registerServiceProvider(const ::rtl::OUString& _rServiceImplName, const Sequence< ::rtl::OUString >& _rServices, XRegistryKey* _pKey) -{ - ::rtl::OUString sMainKeyName = ::rtl::OUString::createFromAscii("/"); - sMainKeyName += _rServiceImplName; - sMainKeyName += ::rtl::OUString::createFromAscii("/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" { @@ -341,57 +325,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(const *_ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -//--------------------------------------------------------------------------------------- -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( _pServiceManager ), - static_cast( _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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 00d7a81d5a97..5ce7dd2566d2 100644 --- a/forms/util/makefile.mk +++ b/forms/util/makefile.mk @@ -112,3 +112,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 diff --git a/lingucomponent/prj/d.lst b/lingucomponent/prj/d.lst index 666ee38d5b1d..4760a299c84d 100644 --- a/lingucomponent/prj/d.lst +++ b/lingucomponent/prj/d.lst @@ -46,3 +46,8 @@ mkdir: %_DEST%\xml%_EXT%\registry\data\org\openoffice mkdir: %_DEST%\xml%_EXT%\registry\data\org\openoffice\Office ..\config\*.xcu %_DEST%\xml%_EXT%\registry\data\org\openoffice\Office\*.xcu +..\%__SRC%\misc\MacOSXSpell.component %_DEST%\xml%_EXT%\MacOSXSpell.component +..\%__SRC%\misc\guesslang.component %_DEST%\xml%_EXT%\guesslang.component +..\%__SRC%\misc\hyphen.component %_DEST%\xml%_EXT%\hyphen.component +..\%__SRC%\misc\lnth.component %_DEST%\xml%_EXT%\lnth.component +..\%__SRC%\misc\spell.component %_DEST%\xml%_EXT%\spell.component diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/exports.dxp b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/exports.dxp index b0f85bf7bebf..a9861e3ffc0c 100644 --- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/exports.dxp +++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/exports.dxp @@ -1,3 +1,2 @@ component_getFactory component_getImplementationEnvironment -component_writeInfo diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hreg.cxx b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hreg.cxx index 448ecc529bf0..9d975a83b8ef 100644 --- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hreg.cxx +++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hreg.cxx @@ -42,9 +42,6 @@ using namespace com::sun::star::registry; // declaration of external RegEntry-functions defined by the service objects // -extern sal_Bool SAL_CALL Hyphenator_writeInfo( - void * /*pServiceManager*/, XRegistryKey * pRegistryKey ); - extern void * SAL_CALL Hyphenator_getFactory( const sal_Char * pImplName, XMultiServiceFactory * pServiceManager, @@ -57,12 +54,6 @@ extern void * SAL_CALL Hyphenator_getFactory( extern "C" { -sal_Bool SAL_CALL component_writeInfo( - void * pServiceManager, XRegistryKey * pRegistryKey ) -{ - return Hyphenator_writeInfo( pServiceManager, pRegistryKey ); -} - void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) { diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphen.component b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphen.component new file mode 100644 index 000000000000..aeae4c577b98 --- /dev/null +++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphen.component @@ -0,0 +1,34 @@ + + + + + + + + diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx index 3b0871cc36b6..2ed88be186f5 100755 --- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx +++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx @@ -927,32 +927,6 @@ Sequence< OUString > Hyphenator::getSupportedServiceNames_Static() return aSNS; } - -sal_Bool SAL_CALL Hyphenator_writeInfo( - void * /*pServiceManager*/, registry::XRegistryKey * pRegistryKey ) -{ - - try - { - String aImpl( '/' ); - aImpl += Hyphenator::getImplementationName_Static().getStr(); - aImpl.AppendAscii( "/UNO/SERVICES" ); - Reference< registry::XRegistryKey > xNewKey = - pRegistryKey->createKey( aImpl ); - Sequence< OUString > aServices = - Hyphenator::getSupportedServiceNames_Static(); - for( INT32 i = 0; i < aServices.getLength(); i++ ) - xNewKey->createKey( aServices.getConstArray()[i] ); - - return sal_True; - } - catch(Exception &) - { - return sal_False; - } -} - - void * SAL_CALL Hyphenator_getFactory( const sal_Char * pImplName, XMultiServiceFactory * pServiceManager, void * ) { diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/makefile.mk b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/makefile.mk index f3626c70312b..6f767d8bfa9e 100644 --- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/makefile.mk +++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/makefile.mk @@ -91,3 +91,11 @@ DEF1EXPORTFILE= exports.dxp .INCLUDE : target.mk + +ALLTAR : $(MISC)/hyphen.component + +$(MISC)/hyphen.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + hyphen.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt hyphen.component diff --git a/lingucomponent/source/languageguessing/guesslang.component b/lingucomponent/source/languageguessing/guesslang.component new file mode 100644 index 000000000000..633a489c38fa --- /dev/null +++ b/lingucomponent/source/languageguessing/guesslang.component @@ -0,0 +1,34 @@ + + + + + + + + diff --git a/lingucomponent/source/languageguessing/guesslang.cxx b/lingucomponent/source/languageguessing/guesslang.cxx index c8486c1bc471..baac0fd7e856 100644 --- a/lingucomponent/source/languageguessing/guesslang.cxx +++ b/lingucomponent/source/languageguessing/guesslang.cxx @@ -465,13 +465,6 @@ void SAL_CALL component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -sal_Bool SAL_CALL component_writeInfo( - XMultiServiceFactory * xMgr, registry::XRegistryKey * xRegistry ) -{ - return ::cppu::component_writeInfoHelper( - xMgr, xRegistry, s_component_entries ); -} - void * SAL_CALL component_getFactory( sal_Char const * implName, lang::XMultiServiceFactory * xMgr, registry::XRegistryKey * xRegistry ) diff --git a/lingucomponent/source/languageguessing/makefile.mk b/lingucomponent/source/languageguessing/makefile.mk index ebad4076b3ed..624ccba3c334 100644 --- a/lingucomponent/source/languageguessing/makefile.mk +++ b/lingucomponent/source/languageguessing/makefile.mk @@ -78,3 +78,11 @@ DEF1NAME =$(SHL1TARGET) .INCLUDE : target.mk + +ALLTAR : $(MISC)/guesslang.component + +$(MISC)/guesslang.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + guesslang.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt guesslang.component diff --git a/lingucomponent/source/spellcheck/macosxspell/MacOSXSpell.component b/lingucomponent/source/spellcheck/macosxspell/MacOSXSpell.component new file mode 100644 index 000000000000..2f2f9e102087 --- /dev/null +++ b/lingucomponent/source/spellcheck/macosxspell/MacOSXSpell.component @@ -0,0 +1,34 @@ + + + + + + + + diff --git a/lingucomponent/source/spellcheck/macosxspell/macreg.cxx b/lingucomponent/source/spellcheck/macosxspell/macreg.cxx index b60ffffe42e9..9df90f79cca7 100644 --- a/lingucomponent/source/spellcheck/macosxspell/macreg.cxx +++ b/lingucomponent/source/spellcheck/macosxspell/macreg.cxx @@ -42,9 +42,6 @@ using namespace com::sun::star::registry; // declaration of external RegEntry-functions defined by the service objects // -extern sal_Bool SAL_CALL MacSpellChecker_writeInfo( - void * /*pServiceManager*/, XRegistryKey * pRegistryKey ); - extern void * SAL_CALL MacSpellChecker_getFactory( const sal_Char * pImplName, XMultiServiceFactory * pServiceManager, @@ -57,12 +54,6 @@ extern void * SAL_CALL MacSpellChecker_getFactory( extern "C" { -sal_Bool SAL_CALL component_writeInfo( - void * pServiceManager, XRegistryKey * pRegistryKey ) -{ - return MacSpellChecker_writeInfo( pServiceManager, pRegistryKey ); -} - void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) { diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx b/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx index 70996793c186..002f1dec0b36 100644 --- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx +++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx @@ -644,32 +644,6 @@ Sequence< OUString > MacSpellChecker::getSupportedServiceNames_Static() return aSNS; } - -sal_Bool SAL_CALL MacSpellChecker_writeInfo( - void * /*pServiceManager*/, registry::XRegistryKey * pRegistryKey ) -{ - - try - { - String aImpl( '/' ); - aImpl += MacSpellChecker::getImplementationName_Static().getStr(); - aImpl.AppendAscii( "/UNO/SERVICES" ); - Reference< registry::XRegistryKey > xNewKey = - pRegistryKey->createKey( aImpl ); - Sequence< OUString > aServices = - MacSpellChecker::getSupportedServiceNames_Static(); - for( INT32 i = 0; i < aServices.getLength(); i++ ) - xNewKey->createKey( aServices.getConstArray()[i] ); - - return sal_True; - } - catch(Exception &) - { - return sal_False; - } -} - - void * SAL_CALL MacSpellChecker_getFactory( const sal_Char * pImplName, XMultiServiceFactory * pServiceManager, void * ) { diff --git a/lingucomponent/source/spellcheck/macosxspell/makefile.mk b/lingucomponent/source/spellcheck/macosxspell/makefile.mk index 6414560e0f4a..4e88b808ddc0 100644 --- a/lingucomponent/source/spellcheck/macosxspell/makefile.mk +++ b/lingucomponent/source/spellcheck/macosxspell/makefile.mk @@ -91,3 +91,11 @@ SHL1VERSIONMAP=$(SOLARENV)/src/component.map dummy: @echo " Nothing to build for GUIBASE=$(GUIBASE)" .ENDIF + +ALLTAR : $(MISC)/MacOSXSpell.component + +$(MISC)/MacOSXSpell.component .ERRREMOVE : \ + $(SOLARENV)/bin/createcomponent.xslt MacOSXSpell.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt MacOSXSpell.component diff --git a/lingucomponent/source/spellcheck/spell/exports.dxp b/lingucomponent/source/spellcheck/spell/exports.dxp index b0f85bf7bebf..a9861e3ffc0c 100644 --- a/lingucomponent/source/spellcheck/spell/exports.dxp +++ b/lingucomponent/source/spellcheck/spell/exports.dxp @@ -1,3 +1,2 @@ component_getFactory component_getImplementationEnvironment -component_writeInfo diff --git a/lingucomponent/source/spellcheck/spell/makefile.mk b/lingucomponent/source/spellcheck/spell/makefile.mk index 4173d4dbae22..56dd79939b40 100644 --- a/lingucomponent/source/spellcheck/spell/makefile.mk +++ b/lingucomponent/source/spellcheck/spell/makefile.mk @@ -85,3 +85,11 @@ DEF1EXPORTFILE= exports.dxp .INCLUDE : target.mk + +ALLTAR : $(MISC)/spell.component + +$(MISC)/spell.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + spell.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt spell.component diff --git a/lingucomponent/source/spellcheck/spell/spell.component b/lingucomponent/source/spellcheck/spell/spell.component new file mode 100644 index 000000000000..9f951a8a8f76 --- /dev/null +++ b/lingucomponent/source/spellcheck/spell/spell.component @@ -0,0 +1,34 @@ + + + + + + + + diff --git a/lingucomponent/source/spellcheck/spell/sreg.cxx b/lingucomponent/source/spellcheck/spell/sreg.cxx index bd97403c89d6..4c6375698de6 100644 --- a/lingucomponent/source/spellcheck/spell/sreg.cxx +++ b/lingucomponent/source/spellcheck/spell/sreg.cxx @@ -42,9 +42,6 @@ using namespace com::sun::star::registry; // declaration of external RegEntry-functions defined by the service objects // -extern sal_Bool SAL_CALL SpellChecker_writeInfo( - void * /*pServiceManager*/, XRegistryKey * pRegistryKey ); - extern void * SAL_CALL SpellChecker_getFactory( const sal_Char * pImplName, XMultiServiceFactory * pServiceManager, @@ -56,12 +53,6 @@ extern void * SAL_CALL SpellChecker_getFactory( extern "C" { -sal_Bool SAL_CALL component_writeInfo( - void * pServiceManager, XRegistryKey * pRegistryKey ) -{ - return SpellChecker_writeInfo( pServiceManager, pRegistryKey ); -} - void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) { diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx index 0cb6ad8ec3da..0061c7d99aaf 100644 --- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx +++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx @@ -673,32 +673,6 @@ Sequence< OUString > SpellChecker::getSupportedServiceNames_Static() return aSNS; } - -sal_Bool SAL_CALL SpellChecker_writeInfo( - void * /*pServiceManager*/, registry::XRegistryKey * pRegistryKey ) -{ - - try - { - String aImpl( '/' ); - aImpl += SpellChecker::getImplementationName_Static().getStr(); - aImpl.AppendAscii( "/UNO/SERVICES" ); - Reference< registry::XRegistryKey > xNewKey = - pRegistryKey->createKey( aImpl ); - Sequence< OUString > aServices = - SpellChecker::getSupportedServiceNames_Static(); - for( INT32 i = 0; i < aServices.getLength(); i++ ) - xNewKey->createKey( aServices.getConstArray()[i] ); - - return sal_True; - } - catch(Exception &) - { - return sal_False; - } -} - - void * SAL_CALL SpellChecker_getFactory( const sal_Char * pImplName, XMultiServiceFactory * pServiceManager, void * ) { diff --git a/lingucomponent/source/thesaurus/libnth/exports.dxp b/lingucomponent/source/thesaurus/libnth/exports.dxp index b0f85bf7bebf..a9861e3ffc0c 100644 --- a/lingucomponent/source/thesaurus/libnth/exports.dxp +++ b/lingucomponent/source/thesaurus/libnth/exports.dxp @@ -1,3 +1,2 @@ component_getFactory component_getImplementationEnvironment -component_writeInfo diff --git a/lingucomponent/source/thesaurus/libnth/lnth.component b/lingucomponent/source/thesaurus/libnth/lnth.component new file mode 100644 index 000000000000..bea91b94c1fe --- /dev/null +++ b/lingucomponent/source/thesaurus/libnth/lnth.component @@ -0,0 +1,34 @@ + + + + + + + + diff --git a/lingucomponent/source/thesaurus/libnth/makefile.mk b/lingucomponent/source/thesaurus/libnth/makefile.mk index 58e4d97e5561..91d39d2d3eeb 100644 --- a/lingucomponent/source/thesaurus/libnth/makefile.mk +++ b/lingucomponent/source/thesaurus/libnth/makefile.mk @@ -105,3 +105,11 @@ DEF1EXPORTFILE= exports.dxp .INCLUDE : target.mk + +ALLTAR : $(MISC)/lnth.component + +$(MISC)/lnth.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + lnth.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt lnth.component diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx index bd6afffdbd6a..81f7c19506ba 100644 --- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx +++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx @@ -739,31 +739,6 @@ Sequence< OUString > Thesaurus::getSupportedServiceNames_Static() return aSNS; } - -sal_Bool SAL_CALL Thesaurus_writeInfo( - void * /*pServiceManager*/, registry::XRegistryKey * pRegistryKey ) -{ - try - { - String aImpl( '/' ); - aImpl += Thesaurus::getImplementationName_Static().getStr(); - aImpl.AppendAscii( "/UNO/SERVICES" ); - Reference< registry::XRegistryKey > xNewKey = - pRegistryKey->createKey( aImpl ); - Sequence< OUString > aServices = - Thesaurus::getSupportedServiceNames_Static(); - for( INT32 i = 0; i < aServices.getLength(); i++ ) - xNewKey->createKey( aServices.getConstArray()[i] ); - - return sal_True; - } - catch(Exception &) - { - return sal_False; - } -} - - void * SAL_CALL Thesaurus_getFactory( const sal_Char * pImplName, XMultiServiceFactory * pServiceManager, void * ) { diff --git a/lingucomponent/source/thesaurus/libnth/ntreg.cxx b/lingucomponent/source/thesaurus/libnth/ntreg.cxx index 14b3b3c896d4..f622e1e094c8 100644 --- a/lingucomponent/source/thesaurus/libnth/ntreg.cxx +++ b/lingucomponent/source/thesaurus/libnth/ntreg.cxx @@ -41,9 +41,6 @@ using namespace com::sun::star::registry; // declaration of external RegEntry-functions defined by the service objects // -extern sal_Bool SAL_CALL Thesaurus_writeInfo( - void * /*pServiceManager*/, XRegistryKey * pRegistryKey ); - extern void * SAL_CALL Thesaurus_getFactory( const sal_Char * pImplName, XMultiServiceFactory * pServiceManager, @@ -56,12 +53,6 @@ extern void * SAL_CALL Thesaurus_getFactory( extern "C" { -sal_Bool SAL_CALL component_writeInfo( - void * pServiceManager, XRegistryKey * pRegistryKey ) -{ - return Thesaurus_writeInfo( pServiceManager, pRegistryKey ); -} - void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) { diff --git a/package/prj/d.lst b/package/prj/d.lst index 23966d0cfeae..919a1719aa09 100644 --- a/package/prj/d.lst +++ b/package/prj/d.lst @@ -3,3 +3,5 @@ ..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT%\lib*.so ..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib ..\dtd\*.dtd %_DEST%\bin%_EXT%\*.* +..\%__SRC%\misc\package2.component %_DEST%\xml%_EXT%\package2.component +..\%__SRC%\misc\xstor.component %_DEST%\xml%_EXT%\xstor.component diff --git a/package/source/manifest/UnoRegister.cxx b/package/source/manifest/UnoRegister.cxx index 2405495f321f..34dd874206e1 100644 --- a/package/source/manifest/UnoRegister.cxx +++ b/package/source/manifest/UnoRegister.cxx @@ -46,43 +46,6 @@ using namespace ::com::sun::star::registry; using namespace ::com::sun::star::packages; using namespace ::com::sun::star::packages::manifest; -static sal_Bool writeInfo( void * pRegistryKey, - const OUString & rImplementationName, - Sequence< OUString > const & rServiceNames ) -{ - OUString aKeyName( OUString::createFromAscii( "/" ) ); - aKeyName += rImplementationName; - aKeyName += OUString::createFromAscii( "/UNO/SERVICES" ); - - Reference< XRegistryKey > xKey; - try - { - xKey = static_cast< XRegistryKey * >( - pRegistryKey )->createKey( aKeyName ); - } - catch ( InvalidRegistryException const & ) - { - } - - if ( !xKey.is() ) - return sal_False; - - sal_Bool bSuccess = sal_True; - - for ( sal_Int32 n = 0; n < rServiceNames.getLength(); ++n ) - { - try - { - xKey->createKey( rServiceNames[ n ] ); - } - catch ( InvalidRegistryException const & ) - { - bSuccess = sal_False; - break; - } - } - return bSuccess; -} // C functions to implement this as a component extern "C" void SAL_CALL component_getImplementationEnvironment( @@ -91,32 +54,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -/** - * This function creates an implementation section in the registry and another subkey - * for each supported service. - * @param pServiceManager generic uno interface providing a service manager - * @param pRegistryKey generic uno interface providing registry key to write - */ -extern "C" sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistryKey ) -{ - return pRegistryKey && - writeInfo (pRegistryKey, - ManifestReader::static_getImplementationName(), - ManifestReader::static_getSupportedServiceNames() ) && - writeInfo (pRegistryKey, - ManifestWriter::static_getImplementationName(), - ManifestWriter::static_getSupportedServiceNames() ) && - writeInfo (pRegistryKey, - ZipPackage::static_getImplementationName(), - ZipPackage::static_getSupportedServiceNames() ) && - - writeInfo (pRegistryKey, - OZipFileAccess::impl_staticGetImplementationName(), - OZipFileAccess::impl_staticGetSupportedServiceNames() ); - -} - - /** * This function is called to get service factories for an implementation. * @param pImplName name of implementation diff --git a/package/source/xstor/makefile.mk b/package/source/xstor/makefile.mk index 76494cb7dbe7..5c381ba4c803 100644 --- a/package/source/xstor/makefile.mk +++ b/package/source/xstor/makefile.mk @@ -73,3 +73,11 @@ DEF1EXPORTFILE=$(SHL1TARGET).dxp .INCLUDE : target.mk + +ALLTAR : $(MISC)/xstor.component + +$(MISC)/xstor.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + xstor.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt xstor.component diff --git a/package/source/xstor/register.cxx b/package/source/xstor/register.cxx index 1e3ae15fe383..808788345bfc 100644 --- a/package/source/xstor/register.cxx +++ b/package/source/xstor/register.cxx @@ -69,33 +69,5 @@ void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServic return pRet; } -sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, void * pRegistryKey ) -{ - if (pRegistryKey) - { - try - { - uno::Reference< registry::XRegistryKey > xKey( reinterpret_cast< registry::XRegistryKey* >( pRegistryKey ) ); - - uno::Reference< registry::XRegistryKey > xNewKey; - - xNewKey = xKey->createKey( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + - OStorageFactory::impl_staticGetImplementationName() + - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) ); - - const uno::Sequence< ::rtl::OUString > aServices = OStorageFactory::impl_staticGetSupportedServiceNames(); - for( sal_Int32 ind = 0; ind < aServices.getLength(); ind++ ) - xNewKey->createKey( aServices.getConstArray()[ind] ); - - return sal_True; - } - catch (registry::InvalidRegistryException &) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - } - } - return sal_False; -} - } // extern "C" diff --git a/package/source/xstor/xstor.component b/package/source/xstor/xstor.component new file mode 100644 index 000000000000..f338d6a546cb --- /dev/null +++ b/package/source/xstor/xstor.component @@ -0,0 +1,35 @@ + + + + + + + + + diff --git a/package/source/xstor/xstor.dxp b/package/source/xstor/xstor.dxp index 9630d7e06768..f0e1c69934bc 100644 --- a/package/source/xstor/xstor.dxp +++ b/package/source/xstor/xstor.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/package/util/exports.dxp b/package/util/exports.dxp index 9630d7e06768..f0e1c69934bc 100644 --- a/package/util/exports.dxp +++ b/package/util/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/package/util/makefile.mk b/package/util/makefile.mk index 20732c102007..344b2cf1346f 100644 --- a/package/util/makefile.mk +++ b/package/util/makefile.mk @@ -75,3 +75,11 @@ DEF1NAME=$(SHL1TARGET) .INCLUDE : target.mk + +ALLTAR : $(MISC)/package2.component + +$(MISC)/package2.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + package2.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt package2.component diff --git a/package/util/package2.component b/package/util/package2.component new file mode 100644 index 000000000000..cdfa842d0db6 --- /dev/null +++ b/package/util/package2.component @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + diff --git a/wizards/com/sun/star/wizards/agenda/CallWizard.java b/wizards/com/sun/star/wizards/agenda/CallWizard.java index 69b62c56e4f7..3dc8dcd8ef91 100644 --- a/wizards/com/sun/star/wizards/agenda/CallWizard.java +++ b/wizards/com/sun/star/wizards/agenda/CallWizard.java @@ -40,8 +40,7 @@ import com.sun.star.uno.Type; /** * This class capsulates the class, that implements the minimal component, a factory for - * creating the service (__getServiceFactory) and a method, that writes the - * information into the given registry key (__writeRegistryServiceInfo). + * creating the service (__getServiceFactory). * * @author $author$ * @version $Revision: 1.5.52.1 $ @@ -73,21 +72,6 @@ public class CallWizard { return xsingleservicefactory; } - /** - * Writes the service information into the given registry key. This method is called - * by the JavaLoader. - * - * @param xregistrykey Makes structural information (except regarding tree - * structures) of a single registry key accessible. - * - * @return returns true if the operation succeeded - * - * @see com.sun.star.comp.loader.JavaLoader# - */ - public static boolean __writeRegistryServiceInfo(XRegistryKey xregistrykey) { - return FactoryHelper.writeRegistryServiceInfo(WizardImplementation.class.getName(), WizardImplementation.__serviceName, xregistrykey); - } - /** * This class implements the component. At least the interfaces XServiceInfo, * XTypeProvider, and XInitialization should be provided by the service. diff --git a/wizards/com/sun/star/wizards/agenda/agenda.component b/wizards/com/sun/star/wizards/agenda/agenda.component new file mode 100644 index 000000000000..e35087d947e2 --- /dev/null +++ b/wizards/com/sun/star/wizards/agenda/agenda.component @@ -0,0 +1,35 @@ + + + + + + + + diff --git a/wizards/com/sun/star/wizards/agenda/makefile.mk b/wizards/com/sun/star/wizards/agenda/makefile.mk index 314dcf3b7da9..1f07e9adfbcc 100644 --- a/wizards/com/sun/star/wizards/agenda/makefile.mk +++ b/wizards/com/sun/star/wizards/agenda/makefile.mk @@ -69,3 +69,11 @@ JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) # --- Targets ------------------------------------------------------ .INCLUDE : target.mk + +ALLTAR : $(MISC)/agenda.component + +$(MISC)/agenda.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + agenda.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_JAVA)$(JARTARGET)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt agenda.component diff --git a/wizards/com/sun/star/wizards/fax/CallWizard.java b/wizards/com/sun/star/wizards/fax/CallWizard.java index b20dc0890e56..69e061f95918 100644 --- a/wizards/com/sun/star/wizards/fax/CallWizard.java +++ b/wizards/com/sun/star/wizards/fax/CallWizard.java @@ -41,8 +41,7 @@ import com.sun.star.uno.Type; /** * This class capsulates the class, that implements the minimal component, a factory for - * creating the service (__getServiceFactory) and a method, that writes the - * information into the given registry key (__writeRegistryServiceInfo). + * creating the service (__getServiceFactory). * * @author $author$ * @version $Revision: 1.3.192.1 $ @@ -77,22 +76,6 @@ public class CallWizard return xsingleservicefactory; } - /** - * Writes the service information into the given registry key. This method is called - * by the JavaLoader. - * - * @param xregistrykey Makes structural information (except regarding tree - * structures) of a single registry key accessible. - * - * @return returns true if the operation succeeded - * - * @see com.sun.star.comp.loader.JavaLoader# - */ - public static boolean __writeRegistryServiceInfo(XRegistryKey xregistrykey) - { - return FactoryHelper.writeRegistryServiceInfo(WizardImplementation.class.getName(), WizardImplementation.__serviceName, xregistrykey); - } - /** * This class implements the component. At least the interfaces XServiceInfo, * XTypeProvider, and XInitialization should be provided by the service. diff --git a/wizards/com/sun/star/wizards/fax/fax.component b/wizards/com/sun/star/wizards/fax/fax.component new file mode 100644 index 000000000000..462fe2901255 --- /dev/null +++ b/wizards/com/sun/star/wizards/fax/fax.component @@ -0,0 +1,35 @@ + + + + + + + + diff --git a/wizards/com/sun/star/wizards/fax/makefile.mk b/wizards/com/sun/star/wizards/fax/makefile.mk index 247aaf063529..5cf08939263b 100644 --- a/wizards/com/sun/star/wizards/fax/makefile.mk +++ b/wizards/com/sun/star/wizards/fax/makefile.mk @@ -60,3 +60,11 @@ JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) # --- Targets ------------------------------------------------------ .INCLUDE : target.mk + +ALLTAR : $(MISC)/fax.component + +$(MISC)/fax.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + fax.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_JAVA)$(JARTARGET)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt fax.component diff --git a/wizards/com/sun/star/wizards/form/CallFormWizard.java b/wizards/com/sun/star/wizards/form/CallFormWizard.java index 9a8e73951c69..0538eb5fa1b3 100644 --- a/wizards/com/sun/star/wizards/form/CallFormWizard.java +++ b/wizards/com/sun/star/wizards/form/CallFormWizard.java @@ -31,9 +31,7 @@ import com.sun.star.uno.Type; import com.sun.star.wizards.common.Properties; /** This class capsulates the class, that implements the minimal component, a - * factory for creating the service (__getServiceFactory) and a - * method, that writes the information into the given registry key - * (__writeRegistryServiceInfo). + * factory for creating the service (__getServiceFactory). * @author Bertram Nolte */ public class CallFormWizard @@ -62,19 +60,6 @@ public class CallFormWizard return xsingleservicefactory; } - /** Writes the service information into the given registry key. - * This method is called by the JavaLoader. - * @return returns true if the operation succeeded - * @see com.sun.star.comp.loader.JavaLoader# - * @param xregistrykey Makes structural information (except regarding tree - * structures) of a single - * registry key accessible. - */ - public static boolean __writeRegistryServiceInfo(com.sun.star.registry.XRegistryKey xregistrykey) - { - return com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(FormWizardImplementation.class.getName(), FormWizardImplementation.__serviceName, xregistrykey); - } - /** This class implements the component. At least the interfaces XServiceInfo, * XTypeProvider, and XInitialization should be provided by the service. */ diff --git a/wizards/com/sun/star/wizards/form/form.component b/wizards/com/sun/star/wizards/form/form.component new file mode 100644 index 000000000000..3f010d8bc88f --- /dev/null +++ b/wizards/com/sun/star/wizards/form/form.component @@ -0,0 +1,35 @@ + + + + + + + + diff --git a/wizards/com/sun/star/wizards/form/makefile.mk b/wizards/com/sun/star/wizards/form/makefile.mk index 092135289fc9..b6366607324e 100644 --- a/wizards/com/sun/star/wizards/form/makefile.mk +++ b/wizards/com/sun/star/wizards/form/makefile.mk @@ -65,3 +65,11 @@ JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) # --- Targets ------------------------------------------------------ .INCLUDE : target.mk + +ALLTAR : $(MISC)/form.component + +$(MISC)/form.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + form.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_JAVA)$(JARTARGET)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt form.component diff --git a/wizards/com/sun/star/wizards/letter/CallWizard.java b/wizards/com/sun/star/wizards/letter/CallWizard.java index f3508512807d..ff993c61e506 100644 --- a/wizards/com/sun/star/wizards/letter/CallWizard.java +++ b/wizards/com/sun/star/wizards/letter/CallWizard.java @@ -41,8 +41,7 @@ import com.sun.star.uno.Type; /** * This class capsulates the class, that implements the minimal component, a factory for - * creating the service (__getServiceFactory) and a method, that writes the - * information into the given registry key (__writeRegistryServiceInfo). + * creating the service (__getServiceFactory). * * @author $author$ * @version $Revision: 1.3.192.1 $ @@ -77,22 +76,6 @@ public class CallWizard return xsingleservicefactory; } - /** - * Writes the service information into the given registry key. This method is called - * by the JavaLoader. - * - * @param xregistrykey Makes structural information (except regarding tree - * structures) of a single registry key accessible. - * - * @return returns true if the operation succeeded - * - * @see com.sun.star.comp.loader.JavaLoader# - */ - public static boolean __writeRegistryServiceInfo(XRegistryKey xregistrykey) - { - return FactoryHelper.writeRegistryServiceInfo(WizardImplementation.class.getName(), WizardImplementation.__serviceName, xregistrykey); - } - /** * This class implements the component. At least the interfaces XServiceInfo, * XTypeProvider, and XInitialization should be provided by the service. diff --git a/wizards/com/sun/star/wizards/letter/letter.component b/wizards/com/sun/star/wizards/letter/letter.component new file mode 100644 index 000000000000..277aae81e90a --- /dev/null +++ b/wizards/com/sun/star/wizards/letter/letter.component @@ -0,0 +1,35 @@ + + + + + + + + diff --git a/wizards/com/sun/star/wizards/letter/makefile.mk b/wizards/com/sun/star/wizards/letter/makefile.mk index 700d0b72dfb7..ca6c750bac81 100644 --- a/wizards/com/sun/star/wizards/letter/makefile.mk +++ b/wizards/com/sun/star/wizards/letter/makefile.mk @@ -63,3 +63,11 @@ JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) # --- Targets ------------------------------------------------------ .INCLUDE : target.mk + +ALLTAR : $(MISC)/letter.component + +$(MISC)/letter.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + letter.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_JAVA)$(JARTARGET)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt letter.component diff --git a/wizards/com/sun/star/wizards/query/CallQueryWizard.java b/wizards/com/sun/star/wizards/query/CallQueryWizard.java index ec6ab3895fca..fe18fd13f6d0 100644 --- a/wizards/com/sun/star/wizards/query/CallQueryWizard.java +++ b/wizards/com/sun/star/wizards/query/CallQueryWizard.java @@ -34,9 +34,7 @@ import com.sun.star.uno.Type; import com.sun.star.wizards.common.Properties; /** This class capsulates the class, that implements the minimal component, a - * factory for creating the service (__getServiceFactory) and a - * method, that writes the information into the given registry key - * (__writeRegistryServiceInfo). + * factory for creating the service (__getServiceFactory). * @author Bertram Nolte */ public class CallQueryWizard @@ -65,19 +63,6 @@ public class CallQueryWizard return xsingleservicefactory; } - /** Writes the service information into the given registry key. - * This method is called by the JavaLoader. - * @return returns true if the operation succeeded - * @see com.sun.star.comp.loader.JavaLoader# - * @param xregistrykey Makes structural information (except regarding tree - * structures) of a single - * registry key accessible. - */ - public static boolean __writeRegistryServiceInfo(com.sun.star.registry.XRegistryKey xregistrykey) - { - return com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(QueryWizardImplementation.class.getName(), QueryWizardImplementation.__serviceName, xregistrykey); - } - /** This class implements the component. At least the interfaces XServiceInfo, * XTypeProvider, and XInitialization should be provided by the service. */ diff --git a/wizards/com/sun/star/wizards/query/makefile.mk b/wizards/com/sun/star/wizards/query/makefile.mk index af5056ba5221..080076668ce8 100644 --- a/wizards/com/sun/star/wizards/query/makefile.mk +++ b/wizards/com/sun/star/wizards/query/makefile.mk @@ -59,3 +59,11 @@ JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) # --- Targets ------------------------------------------------------ .INCLUDE : target.mk + +ALLTAR : $(MISC)/query.component + +$(MISC)/query.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + query.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_JAVA)$(JARTARGET)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt query.component diff --git a/wizards/com/sun/star/wizards/query/query.component b/wizards/com/sun/star/wizards/query/query.component new file mode 100644 index 000000000000..d1d708c6b91b --- /dev/null +++ b/wizards/com/sun/star/wizards/query/query.component @@ -0,0 +1,35 @@ + + + + + + + + diff --git a/wizards/com/sun/star/wizards/report/CallReportWizard.java b/wizards/com/sun/star/wizards/report/CallReportWizard.java index 89aa7f471705..c66596e11c02 100644 --- a/wizards/com/sun/star/wizards/report/CallReportWizard.java +++ b/wizards/com/sun/star/wizards/report/CallReportWizard.java @@ -35,9 +35,7 @@ import com.sun.star.sdb.application.XDatabaseDocumentUI; import com.sun.star.wizards.common.NamedValueCollection; /** This class capsulates the class, that implements the minimal component, a - * factory for creating the service (__getServiceFactory) and a - * method, that writes the information into the given registry key - * (__writeRegistryServiceInfo). + * factory for creating the service (__getServiceFactory). * @author Bertram Nolte */ public class CallReportWizard @@ -94,22 +92,6 @@ public class CallReportWizard return xsingleservicefactory; } - /** Writes the service information into the given registry key. - * This method is called by the JavaLoader. - * @return returns true if the operation succeeded - * @see com.sun.star.comp.loader.JavaLoader# - * @param xregistrykey Makes structural information (except regarding tree - * structures) of a single - * registry key accessible. - */ - public static boolean __writeRegistryServiceInfo(com.sun.star.registry.XRegistryKey xregistrykey) - { - return com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo( - ReportWizardImplementation.class.getName(), - ReportWizardImplementation.__serviceName, - xregistrykey); - } - /** This class implements the component. At least the interfaces XServiceInfo, * XTypeProvider, and XInitialization should be provided by the service. */ diff --git a/wizards/com/sun/star/wizards/report/makefile.mk b/wizards/com/sun/star/wizards/report/makefile.mk index b31639d21a46..62b948674530 100644 --- a/wizards/com/sun/star/wizards/report/makefile.mk +++ b/wizards/com/sun/star/wizards/report/makefile.mk @@ -66,3 +66,11 @@ JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) # --- Targets ------------------------------------------------------ .INCLUDE : target.mk + +ALLTAR : $(MISC)/report.component + +$(MISC)/report.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + report.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_JAVA)$(JARTARGET)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt report.component diff --git a/wizards/com/sun/star/wizards/report/report.component b/wizards/com/sun/star/wizards/report/report.component new file mode 100644 index 000000000000..67efca9273e7 --- /dev/null +++ b/wizards/com/sun/star/wizards/report/report.component @@ -0,0 +1,35 @@ + + + + + + + + diff --git a/wizards/com/sun/star/wizards/table/CallTableWizard.java b/wizards/com/sun/star/wizards/table/CallTableWizard.java index 4aeb66cf66ca..af685eadf343 100644 --- a/wizards/com/sun/star/wizards/table/CallTableWizard.java +++ b/wizards/com/sun/star/wizards/table/CallTableWizard.java @@ -32,9 +32,7 @@ import com.sun.star.uno.Type; import com.sun.star.wizards.common.Properties; /** This class capsulates the class, that implements the minimal component, a - * factory for creating the service (__getServiceFactory) and a - * method, that writes the information into the given registry key - * (__writeRegistryServiceInfo). + * factory for creating the service (__getServiceFactory). * @author Bertram Nolte */ public class CallTableWizard @@ -63,19 +61,6 @@ public class CallTableWizard return xsingleservicefactory; } - /** Writes the service information into the given registry key. - * This method is called by the JavaLoader. - * @return returns true if the operation succeeded - * @see com.sun.star.comp.loader.JavaLoader# - * @param xregistrykey Makes structural information (except regarding tree - * structures) of a single - * registry key accessible. - */ - public static boolean __writeRegistryServiceInfo(com.sun.star.registry.XRegistryKey xregistrykey) - { - return com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(TableWizardImplementation.class.getName(), TableWizardImplementation.__serviceName, xregistrykey); - } - /** This class implements the component. At least the interfaces XServiceInfo, * XTypeProvider, and XInitialization should be provided by the service. */ diff --git a/wizards/com/sun/star/wizards/table/makefile.mk b/wizards/com/sun/star/wizards/table/makefile.mk index c0d62baa7cac..4343af99d45d 100644 --- a/wizards/com/sun/star/wizards/table/makefile.mk +++ b/wizards/com/sun/star/wizards/table/makefile.mk @@ -63,3 +63,11 @@ JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) # --- Targets ------------------------------------------------------ .INCLUDE : target.mk + +ALLTAR : $(MISC)/table.component + +$(MISC)/table.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + table.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_JAVA)$(JARTARGET)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt table.component diff --git a/wizards/com/sun/star/wizards/table/table.component b/wizards/com/sun/star/wizards/table/table.component new file mode 100644 index 000000000000..24cacd225181 --- /dev/null +++ b/wizards/com/sun/star/wizards/table/table.component @@ -0,0 +1,35 @@ + + + + + + + + diff --git a/wizards/com/sun/star/wizards/web/CallWizard.java b/wizards/com/sun/star/wizards/web/CallWizard.java index f0318e5f2e18..4fab3ea43bf9 100644 --- a/wizards/com/sun/star/wizards/web/CallWizard.java +++ b/wizards/com/sun/star/wizards/web/CallWizard.java @@ -42,8 +42,7 @@ import com.sun.star.wizards.common.Resource; /** * This class capsulates the class, that implements the minimal component, a factory for - * creating the service (__getServiceFactory) and a method, that writes the - * information into the given registry key (__writeRegistryServiceInfo). + * creating the service (__getServiceFactory). * * @author rpiterman * @version $Revision: 1.10.52.1 $ @@ -78,22 +77,6 @@ public class CallWizard return xsingleservicefactory; } - /** - * Writes the service information into the given registry key. This method is called - * by the JavaLoader. - * - * @param xregistrykey Makes structural information (except regarding tree - * structures) of a single registry key accessible. - * - * @return returns true if the operation succeeded - * - * @see com.sun.star.comp.loader.JavaLoader# - */ - public static boolean __writeRegistryServiceInfo(XRegistryKey xregistrykey) - { - return FactoryHelper.writeRegistryServiceInfo(WizardImplementation.class.getName(), WizardImplementation.__serviceName, xregistrykey); - } - /** * This class implements the component. At least the interfaces XServiceInfo, * XTypeProvider, and XInitialization should be provided by the service. diff --git a/wizards/com/sun/star/wizards/web/makefile.mk b/wizards/com/sun/star/wizards/web/makefile.mk index 9cc97e1b88ab..2e0394d2971c 100644 --- a/wizards/com/sun/star/wizards/web/makefile.mk +++ b/wizards/com/sun/star/wizards/web/makefile.mk @@ -83,3 +83,11 @@ JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) # --- Targets ------------------------------------------------------ .INCLUDE : target.mk + +ALLTAR : $(MISC)/web.component + +$(MISC)/web.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + web.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_JAVA)$(JARTARGET)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt web.component diff --git a/wizards/com/sun/star/wizards/web/web.component b/wizards/com/sun/star/wizards/web/web.component new file mode 100644 index 000000000000..763438f965a5 --- /dev/null +++ b/wizards/com/sun/star/wizards/web/web.component @@ -0,0 +1,35 @@ + + + + + + + + diff --git a/wizards/prj/d.lst b/wizards/prj/d.lst index 4d1ad83d1c42..f8ab876ba1c1 100644 --- a/wizards/prj/d.lst +++ b/wizards/prj/d.lst @@ -13,3 +13,11 @@ mkdir: %_DEST%\pck%_EXT% REM ..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\*.res ..\%__SRC%\class\*.jar %_DEST%\bin%_EXT%\*.jar +..\%__SRC%\misc\agenda.component %_DEST%\xml%_EXT%\agenda.component +..\%__SRC%\misc\fax.component %_DEST%\xml%_EXT%\fax.component +..\%__SRC%\misc\form.component %_DEST%\xml%_EXT%\form.component +..\%__SRC%\misc\letter.component %_DEST%\xml%_EXT%\letter.component +..\%__SRC%\misc\query.component %_DEST%\xml%_EXT%\query.component +..\%__SRC%\misc\report.component %_DEST%\xml%_EXT%\report.component +..\%__SRC%\misc\table.component %_DEST%\xml%_EXT%\table.component +..\%__SRC%\misc\web.component %_DEST%\xml%_EXT%\web.component diff --git a/xmlsecurity/prj/d.lst b/xmlsecurity/prj/d.lst index 270415164c0f..94967c20a2e8 100644 --- a/xmlsecurity/prj/d.lst +++ b/xmlsecurity/prj/d.lst @@ -8,3 +8,6 @@ mkdir: %COMMON_DEST%\bin%_EXT%\hid ..\%__SRC%\lib\libxmlsecurity.so %_DEST%\lib%_EXT%\libxmlsecurity.so ..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\* ..\%__SRC%\bin\xmlsec*.res %_DEST%\bin%_EXT%\xmlsec*.res +..\%__SRC%\misc\xmlsecurity.component %_DEST%\xml%_EXT%\xmlsecurity.component +..\%__SRC%\misc\xsec_fw.component %_DEST%\xml%_EXT%\xsec_fw.component +..\%__SRC%\misc\xsec_xmlsec.component %_DEST%\xml%_EXT%\xsec_xmlsec.component diff --git a/xmlsecurity/source/component/registerservices.cxx b/xmlsecurity/source/component/registerservices.cxx index 653b1038ba71..0f6efeff05ce 100644 --- a/xmlsecurity/source/component/registerservices.cxx +++ b/xmlsecurity/source/component/registerservices.cxx @@ -46,48 +46,6 @@ void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTyp *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistryKey ) -{ - if (pRegistryKey) - { - try - { - sal_Int32 nPos = 0; - // SERVICE DocumentDigitalSignatures - nPos = 0; - uno::Reference< registry::XRegistryKey > xNewKey( - reinterpret_cast< registry::XRegistryKey* >( pRegistryKey )->createKey( DocumentDigitalSignatures::GetImplementationName() ) ); - - xNewKey = xNewKey->createKey( rtl::OUString::createFromAscii( "/UNO/SERVICES" ) ); - - const uno::Sequence< rtl::OUString >& rSNL = DocumentDigitalSignatures::GetSupportedServiceNames(); - const rtl::OUString* pArray = rSNL.getConstArray(); - for ( nPos = rSNL.getLength(); nPos--; ) - xNewKey->createKey( pArray[nPos] ); - - // SERVICE CertificateContainer - nPos = 0; - uno::Reference< registry::XRegistryKey > xNewKeyCertificateContainer( - reinterpret_cast< registry::XRegistryKey* >( pRegistryKey )->createKey( CertificateContainer::impl_getStaticImplementationName() ) ); - xNewKeyCertificateContainer = xNewKeyCertificateContainer->createKey( rtl::OUString::createFromAscii( "/UNO/SERVICES" ) ); - - const uno::Sequence< rtl::OUString >& rSNLCertificateContainer = CertificateContainer::impl_getStaticSupportedServiceNames(); - const rtl::OUString* pArrayCertificateContainer = rSNLCertificateContainer.getConstArray(); - for ( nPos = rSNLCertificateContainer.getLength(); nPos--; ) - xNewKeyCertificateContainer->createKey( pArrayCertificateContainer[nPos] ); - - //----------------------------- - - return sal_True; - } - catch (registry::InvalidRegistryException &) - { - DBG_ERROR( "InvalidRegistryException!" ); - } - } - return sal_False; -} - void* SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) { void* pRet = 0; diff --git a/xmlsecurity/source/framework/xsec_framework.cxx b/xmlsecurity/source/framework/xsec_framework.cxx index 57eb78028df3..a9c418595901 100644 --- a/xmlsecurity/source/framework/xsec_framework.cxx +++ b/xmlsecurity/source/framework/xsec_framework.cxx @@ -58,83 +58,6 @@ void SAL_CALL component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -//================================================================================================== -sal_Bool SAL_CALL component_writeInfo( - void * /*pServiceManager*/, void * pRegistryKey ) -{ - if (pRegistryKey) - { - try - { - //Decryptor - sal_Int32 nPos = 0; - Reference< XRegistryKey > xNewKey( - reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( DecryptorImpl_getImplementationName() ) ); - xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) ); - - const Sequence< OUString > & rSNL = DecryptorImpl_getSupportedServiceNames(); - const OUString * pArray = rSNL.getConstArray(); - for ( nPos = rSNL.getLength(); nPos--; ) - xNewKey->createKey( pArray[nPos] ); - - //Encryptor - xNewKey = reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( EncryptorImpl_getImplementationName() ); - xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) ); - const Sequence< OUString > & rSNL2 = EncryptorImpl_getSupportedServiceNames(); - pArray = rSNL2.getConstArray(); - for ( nPos = rSNL2.getLength(); nPos--; ) - xNewKey->createKey( pArray[nPos] ); - - //SignatureCreator - xNewKey = reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( SignatureCreatorImpl_getImplementationName() ); - xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) ); - const Sequence< OUString > & rSNL3 = SignatureCreatorImpl_getSupportedServiceNames(); - pArray = rSNL3.getConstArray(); - for ( nPos = rSNL3.getLength(); nPos--; ) - xNewKey->createKey( pArray[nPos] ); - - //SignatureVerifier - xNewKey = reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( SignatureVerifierImpl_getImplementationName() ); - xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) ); - const Sequence< OUString > & rSNL4 = SignatureVerifierImpl_getSupportedServiceNames(); - pArray = rSNL4.getConstArray(); - for ( nPos = rSNL4.getLength(); nPos--; ) - xNewKey->createKey( pArray[nPos] ); - - //SAXEventKeeper - xNewKey = reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( SAXEventKeeperImpl_getImplementationName() ); - xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) ); - const Sequence< OUString > & rSNL5 = SAXEventKeeperImpl_getSupportedServiceNames(); - pArray = rSNL5.getConstArray(); - for ( nPos = rSNL5.getLength(); nPos--; ) - xNewKey->createKey( pArray[nPos] ); - - //XMLSignatureTemplateImpl - xNewKey = reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( XMLSignatureTemplateImpl::impl_getImplementationName() ); - xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) ); - const Sequence< OUString > & rSNL6 = XMLSignatureTemplateImpl::impl_getSupportedServiceNames(); - pArray = rSNL6.getConstArray(); - for ( nPos = rSNL6.getLength(); nPos--; ) - xNewKey->createKey( pArray[nPos] ); - - // XMLEncryptionTemplateImpl - xNewKey = reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( XMLEncryptionTemplateImpl::impl_getImplementationName() ); - xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) ); - const Sequence< OUString > & rSNL7 = XMLEncryptionTemplateImpl::impl_getSupportedServiceNames(); - pArray = rSNL7.getConstArray(); - for ( nPos = rSNL7.getLength(); nPos--; ) - xNewKey->createKey( pArray[nPos] ); - - return sal_True; - } - catch (InvalidRegistryException &) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - } - } - return sal_False; -} - //================================================================================================== void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) diff --git a/xmlsecurity/source/xmlsec/xsec_xmlsec.cxx b/xmlsecurity/source/xmlsec/xsec_xmlsec.cxx index 60a0dbe097a3..44f11b8d0874 100644 --- a/xmlsecurity/source/xmlsec/xsec_xmlsec.cxx +++ b/xmlsecurity/source/xmlsec/xsec_xmlsec.cxx @@ -94,12 +94,10 @@ extern "C" { #if defined( XMLSEC_CRYPTO_NSS ) -extern sal_Bool nss_component_writeInfo( void*, void* ); extern void* nss_component_getFactory( const sal_Char*, void*, void* ); #endif #if defined( XMLSEC_CRYPTO_MSCRYPTO ) -extern sal_Bool mscrypt_component_writeInfo( void*, void* ); extern void* mscrypt_component_getFactory( const sal_Char*, void*, void* ); #endif @@ -109,75 +107,6 @@ void SAL_CALL component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } - -sal_Bool SAL_CALL component_writeInfo( void* pServiceManager , void* pRegistryKey ) -{ - sal_Bool result = sal_False; - sal_Int32 i ; - OUString sKeyName ; - Reference< XRegistryKey > xNewKey ; - Sequence< OUString > seqServices ; - Reference< XRegistryKey > xKey( reinterpret_cast< XRegistryKey* >( pRegistryKey ) ) ; - - if( xKey.is() ) { - // try { - // XMLElementWrapper_XmlSecImpl - sKeyName = OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) ) ; - sKeyName += XMLElementWrapper_XmlSecImpl_getImplementationName() ; - sKeyName += OUString::createFromAscii( "/UNO/SERVICES" ) ; - - xNewKey = xKey->createKey( sKeyName ) ; - if( xNewKey.is() ) { - seqServices = XMLElementWrapper_XmlSecImpl_getSupportedServiceNames() ; - for( i = seqServices.getLength() ; i -- ; ) - xNewKey->createKey( seqServices.getConstArray()[i] ) ; - } - - // XMLDocumentWrapper_XmlSecImpl - sKeyName = OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) ) ; - sKeyName += XMLDocumentWrapper_XmlSecImpl_getImplementationName() ; - sKeyName += OUString::createFromAscii( "/UNO/SERVICES" ) ; - - xNewKey = xKey->createKey( sKeyName ) ; - if( xNewKey.is() ) { - seqServices = XMLDocumentWrapper_XmlSecImpl_getSupportedServiceNames() ; - for( i = seqServices.getLength() ; i -- ; ) - xNewKey->createKey( seqServices.getConstArray()[i] ) ; - } - - // SerialNumberAdapterImpl - sKeyName = OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) ) ; - sKeyName += SerialNumberAdapterImpl_getImplementationName() ; - sKeyName += OUString::createFromAscii( "/UNO/SERVICES" ) ; - - xNewKey = xKey->createKey( sKeyName ) ; - if( xNewKey.is() ) { - seqServices = SerialNumberAdapterImpl_getSupportedServiceNames() ; - for( i = seqServices.getLength() ; i -- ; ) - xNewKey->createKey( seqServices.getConstArray()[i] ) ; - } - -#if defined( XMLSEC_CRYPTO_NSS ) - result = nss_component_writeInfo( pServiceManager, pRegistryKey ) ; - if( !result ) - return sal_False ; -#endif - -#if defined( XMLSEC_CRYPTO_MSCRYPTO ) - result = mscrypt_component_writeInfo( pServiceManager, pRegistryKey ) ; - if( !result ) - return sal_False ; -#endif - - //} catch( InvalidRegistryException & ) { - // //we should not ignore exceptions - // return sal_False ; - //} - } - - return result; -} - void* SAL_CALL component_getFactory( const sal_Char* pImplName , void* pServiceManager , void* pRegistryKey ) { void* pRet = 0; diff --git a/xmlsecurity/util/exports_xsmscrypt.dxp b/xmlsecurity/util/exports_xsmscrypt.dxp index 9630d7e06768..f0e1c69934bc 100644 --- a/xmlsecurity/util/exports_xsmscrypt.dxp +++ b/xmlsecurity/util/exports_xsmscrypt.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/xmlsecurity/util/exports_xsnss.dxp b/xmlsecurity/util/exports_xsnss.dxp index 9630d7e06768..f0e1c69934bc 100644 --- a/xmlsecurity/util/exports_xsnss.dxp +++ b/xmlsecurity/util/exports_xsnss.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/xmlsecurity/util/makefile.mk b/xmlsecurity/util/makefile.mk index 6ef221c7e309..75ef30c7c5ac 100644 --- a/xmlsecurity/util/makefile.mk +++ b/xmlsecurity/util/makefile.mk @@ -172,3 +172,30 @@ DEF4NAME=$(SHL4TARGET) $(MISC)$/$(SHL3TARGET).flt: makefile.mk $(TYPE) $(SHL3TARGET).flt > $@ + +ALLTAR : \ + $(MISC)/xmlsecurity.component \ + $(MISC)/xsec_fw.component \ + $(MISC)/xsec_xmlsec.component + +.IF "$(OS)" == "WNT" +my_platform = .windows +.END + +$(MISC)/xmlsecurity.component .ERRREMOVE : \ + $(SOLARENV)/bin/createcomponent.xslt xmlsecurity.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL4TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt xmlsecurity.component + +$(MISC)/xsec_fw.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + xsec_fw.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt xsec_fw.component + +$(MISC)/xsec_xmlsec.component .ERRREMOVE : \ + $(SOLARENV)/bin/createcomponent.xslt xsec_xmlsec.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL2TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt xsec_xmlsec$(my_platform).component diff --git a/xmlsecurity/util/xmlsecurity.component b/xmlsecurity/util/xmlsecurity.component new file mode 100644 index 000000000000..b0759e937dab --- /dev/null +++ b/xmlsecurity/util/xmlsecurity.component @@ -0,0 +1,37 @@ + + + + + + + + + + + diff --git a/xmlsecurity/util/xsec_fw.component b/xmlsecurity/util/xsec_fw.component new file mode 100644 index 000000000000..eb9e3962a963 --- /dev/null +++ b/xmlsecurity/util/xsec_fw.component @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xmlsecurity/util/xsec_fw.dxp b/xmlsecurity/util/xsec_fw.dxp index 9630d7e06768..f0e1c69934bc 100644 --- a/xmlsecurity/util/xsec_fw.dxp +++ b/xmlsecurity/util/xsec_fw.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/xmlsecurity/util/xsec_xmlsec.component b/xmlsecurity/util/xsec_xmlsec.component new file mode 100644 index 000000000000..de991899f026 --- /dev/null +++ b/xmlsecurity/util/xsec_xmlsec.component @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xmlsecurity/util/xsec_xmlsec.windows.component b/xmlsecurity/util/xsec_xmlsec.windows.component new file mode 100644 index 000000000000..fb11cc6e9d36 --- /dev/null +++ b/xmlsecurity/util/xsec_xmlsec.windows.component @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit From 73971533746918e0776508c0e7d20fd4e34caa61 Mon Sep 17 00:00:00 2001 From: Ingo Schmidt Date: Mon, 13 Sep 2010 17:33:53 +0200 Subject: native330 #163564# fixing installation on Cent OS --- .../org/openoffice/setup/InstallData.java | 9 + .../openoffice/setup/Installer/LinuxInstaller.java | 259 ++++++++------------- .../setup/InstallerHelper/LinuxHelper.java | 35 ++- 3 files changed, 125 insertions(+), 178 deletions(-) diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java index 66598a7ca7cb..74cc40bf08b4 100755 --- a/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java +++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java @@ -76,6 +76,7 @@ public class InstallData static private boolean useRtl = false; static private boolean installedProductMinorSet = false; static private boolean isDebianSystem = false; + static private boolean useForceDebian = false; static private boolean debianInvestigated = false; static private String installType; /* custom or typical installation */ static private String osType; /* Linux, SunOS, ... */ @@ -667,6 +668,14 @@ public class InstallData isDebianSystem = value; } + public boolean useForceDebian() { + return useForceDebian; + } + + public void setUseForceDebian(boolean value) { + useForceDebian = value; + } + public boolean databaseQueried() { return databaseQueried; } diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java index 74f436f8c375..580911cebc5a 100755 --- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java +++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java @@ -202,12 +202,13 @@ public class LinuxInstaller extends Installer { } if ( data.isDebianSystem() ) { - forceDebianString = "--force-debian"; nodepsString = "--nodeps"; + + if ( data.useForceDebian() ) { + forceDebianString = "--force-debian"; + } } - String rpmCommand = ""; - String[] rpmCommandArray; String databasePath = null; String databaseString = ""; boolean useLocalDatabase = false; @@ -225,130 +226,57 @@ public class LinuxInstaller extends Installer { useLocalDatabase = true; } - if (useForce) { - if (useLocalDatabase) { - if ( relocations != null ) { - rpmCommand = "rpm --upgrade --ignoresize --force " + forceDebianString + " " + nodepsString + " -vh " + - "--relocate " + relocations + " " + databaseString + - " " + databasePath + " " + packageName; - rpmCommandArray = new String[12]; - rpmCommandArray[0] = "rpm"; - rpmCommandArray[1] = "--upgrade"; - rpmCommandArray[2] = "--ignoresize"; - rpmCommandArray[3] = "--force"; - rpmCommandArray[4] = forceDebianString; - rpmCommandArray[5] = nodepsString; - rpmCommandArray[6] = "-vh"; - rpmCommandArray[7] = "--relocate"; - rpmCommandArray[8] = relocations; - rpmCommandArray[9] = databaseString; - rpmCommandArray[10] = databasePath; - rpmCommandArray[11] = packageName; - } else { - rpmCommand = "rpm --upgrade --ignoresize --force " + forceDebianString + " " + nodepsString + " -vh " + - databaseString + " " + databasePath + " " + packageName; - rpmCommandArray = new String[10]; - rpmCommandArray[0] = "rpm"; - rpmCommandArray[1] = "--upgrade"; - rpmCommandArray[2] = "--ignoresize"; - rpmCommandArray[3] = "--force"; - rpmCommandArray[4] = forceDebianString; - rpmCommandArray[5] = nodepsString; - rpmCommandArray[6] = "-vh"; - rpmCommandArray[7] = databaseString; - rpmCommandArray[8] = databasePath; - rpmCommandArray[9] = packageName; - } - } else { - if ( relocations != null ) - { - rpmCommand = "rpm --upgrade --ignoresize --force " + forceDebianString + " " + nodepsString + " -vh " + - "--relocate " + relocations + " " + packageName; - rpmCommandArray = new String[10]; - rpmCommandArray[0] = "rpm"; - rpmCommandArray[1] = "--upgrade"; - rpmCommandArray[2] = "--ignoresize"; - rpmCommandArray[3] = "--force"; - rpmCommandArray[4] = forceDebianString; - rpmCommandArray[5] = nodepsString; - rpmCommandArray[6] = "-vh"; - rpmCommandArray[7] = "--relocate"; - rpmCommandArray[8] = relocations; - rpmCommandArray[9] = packageName; - } else { - rpmCommand = "rpm --upgrade --ignoresize --force " + forceDebianString + " " + nodepsString + " -vh " + packageName; - rpmCommandArray = new String[8]; - rpmCommandArray[0] = "rpm"; - rpmCommandArray[1] = "--upgrade"; - rpmCommandArray[2] = "--ignoresize"; - rpmCommandArray[3] = "--force"; - rpmCommandArray[4] = forceDebianString; - rpmCommandArray[5] = nodepsString; - rpmCommandArray[6] = "-vh"; - rpmCommandArray[7] = packageName; - } - } - } else { - if (useLocalDatabase) { - if ( relocations != null ) { - rpmCommand = "rpm --upgrade --ignoresize " + forceDebianString + " " + nodepsString + " -vh " + - "--relocate " + relocations + " " + databaseString + - " " + databasePath + " " + packageName; - rpmCommandArray = new String[11]; - rpmCommandArray[0] = "rpm"; - rpmCommandArray[1] = "--upgrade"; - rpmCommandArray[2] = "--ignoresize"; - rpmCommandArray[3] = forceDebianString; - rpmCommandArray[4] = nodepsString; - rpmCommandArray[5] = "-vh"; - rpmCommandArray[6] = "--relocate"; - rpmCommandArray[7] = relocations; - rpmCommandArray[8] = databaseString; - rpmCommandArray[9] = databasePath; - rpmCommandArray[10] = packageName; - } else { - rpmCommand = "rpm --upgrade --ignoresize " + forceDebianString + " " + nodepsString + " -vh " + - databaseString + " " + databasePath + " " + packageName; - rpmCommandArray = new String[9]; - rpmCommandArray[0] = "rpm"; - rpmCommandArray[1] = "--upgrade"; - rpmCommandArray[2] = "--ignoresize"; - rpmCommandArray[3] = forceDebianString; - rpmCommandArray[4] = nodepsString; - rpmCommandArray[5] = "-vh"; - rpmCommandArray[6] = databaseString; - rpmCommandArray[7] = databasePath; - rpmCommandArray[8] = packageName; - } - } else { - if ( relocations != null ) - { - rpmCommand = "rpm --upgrade --ignoresize " + forceDebianString + " " + nodepsString + " -vh " + - "--relocate " + relocations + " " + packageName; - rpmCommandArray = new String[9]; - rpmCommandArray[0] = "rpm"; - rpmCommandArray[1] = "--upgrade"; - rpmCommandArray[2] = "--ignoresize"; - rpmCommandArray[3] = forceDebianString; - rpmCommandArray[4] = nodepsString; - rpmCommandArray[5] = "-vh"; - rpmCommandArray[6] = "--relocate"; - rpmCommandArray[7] = relocations; - rpmCommandArray[8] = packageName; - } else { - rpmCommand = "rpm --upgrade --ignoresize " + forceDebianString + " " + nodepsString + " -vh " + packageName; - rpmCommandArray = new String[7]; - rpmCommandArray[0] = "rpm"; - rpmCommandArray[1] = "--upgrade"; - rpmCommandArray[2] = "--ignoresize"; - rpmCommandArray[3] = forceDebianString; - rpmCommandArray[4] = nodepsString; - rpmCommandArray[5] = "-vh"; - rpmCommandArray[6] = packageName; - } - } + // Defining a Vector that contains the full rpm command. Then the string array can be + // created dynamically. + + Vector rpmVector = new Vector(); + + rpmVector.add("rpm"); + rpmVector.add("--upgrade"); + rpmVector.add("--ignoresize"); + + if ( useForce ) { + rpmVector.add("--force"); + } + + if ( ! forceDebianString.equals("") ) { + rpmVector.add(forceDebianString); } + if ( ! nodepsString.equals("") ) { + rpmVector.add(nodepsString); + } + + rpmVector.add("-vh"); + + if ( relocations != null ) { + rpmVector.add("--relocate"); + rpmVector.add(relocations); + } + + if ( useLocalDatabase ) { + rpmVector.add(databaseString); + rpmVector.add(databasePath); + } + + rpmVector.add(packageName); + + // Creating String and StringArray for rpm command + + int capacity = rpmVector.size(); + + String rpmCommand = ""; + String[] rpmCommandArray = new String[capacity]; + + for (int i = 0; i < rpmVector.size(); i++) { + rpmCommandArray[i] = (String)rpmVector.get(i); + rpmCommand = rpmCommand + " " + (String)rpmVector.get(i); + } + + rpmCommand = rpmCommand.trim(); + + // Staring rpm process + Vector returnVector = new Vector(); Vector returnErrorVector = new Vector(); // int returnValue = SystemManager.executeProcessReturnVector(rpmCommand, returnVector, returnErrorVector); @@ -407,8 +335,6 @@ public class LinuxInstaller extends Installer { String databasePath = data.getDatabasePath(); String databaseString = ""; boolean useLocalDatabase = false; - String rpmCommand; - String[] rpmCommandArray; if (( databasePath != null ) && (! databasePath.equalsIgnoreCase("null"))) { databaseString = "--dbpath"; @@ -427,52 +353,53 @@ public class LinuxInstaller extends Installer { } if ( data.isDebianSystem() ) { - forceDebianString = "--force-debian"; nodepsString = "--nodeps"; + + if ( data.useForceDebian() ) { + forceDebianString = "--force-debian"; + } } - // Code duplication for isDebianSystem is necessary, because there is no valid position - // for forceDebianString, if it is empty. This is no problem in installPackage. + // Defining a Vector that contains the full rpm command. Then the string array can be + // created dynamically. - if ( data.isDebianSystem() ) { + Vector rpmVector = new Vector(); - if (useLocalDatabase) { - rpmCommand = "rpm " + forceDebianString + " " + nodepsString + " -ev" + " " + databaseString + " " + databasePath + " " + packageName; - rpmCommandArray = new String[7]; - rpmCommandArray[0] = "rpm"; - rpmCommandArray[1] = forceDebianString; - rpmCommandArray[2] = nodepsString; - rpmCommandArray[3] = "-ev"; - rpmCommandArray[4] = databaseString; - rpmCommandArray[5] = databasePath; - rpmCommandArray[6] = packageName; - } else { - rpmCommand = "rpm " + forceDebianString + " " + nodepsString + " -ev" + " " + packageName; - rpmCommandArray = new String[5]; - rpmCommandArray[0] = "rpm"; - rpmCommandArray[1] = forceDebianString; - rpmCommandArray[2] = nodepsString; - rpmCommandArray[3] = "-ev"; - rpmCommandArray[4] = packageName; - } - } else { - if (useLocalDatabase) { - rpmCommand = "rpm -ev" + " " + databaseString + " " + databasePath + " " + packageName; - rpmCommandArray = new String[5]; - rpmCommandArray[0] = "rpm"; - rpmCommandArray[1] = "-ev"; - rpmCommandArray[2] = databaseString; - rpmCommandArray[3] = databasePath; - rpmCommandArray[4] = packageName; - } else { - rpmCommand = "rpm -ev" + " " + packageName; - rpmCommandArray = new String[3]; - rpmCommandArray[0] = "rpm"; - rpmCommandArray[1] = "-ev"; - rpmCommandArray[2] = packageName; - } + rpmVector.add("rpm"); + + if ( ! forceDebianString.equals("") ) { + rpmVector.add(forceDebianString); + } + + if ( ! nodepsString.equals("") ) { + rpmVector.add(nodepsString); + } + + rpmVector.add("-ev"); + + if ( useLocalDatabase ) { + rpmVector.add(databaseString); + rpmVector.add(databasePath); } + rpmVector.add(packageName); + + // Creating String and StringArray for rpm command + + int capacity = rpmVector.size(); + + String rpmCommand = ""; + String[] rpmCommandArray = new String[capacity]; + + for (int i = 0; i < rpmVector.size(); i++) { + rpmCommandArray[i] = (String)rpmVector.get(i); + rpmCommand = rpmCommand + " " + (String)rpmVector.get(i); + } + + rpmCommand = rpmCommand.trim(); + + // Starting rpm process + Vector returnVector = new Vector(); Vector returnErrorVector = new Vector(); int returnValue = ExecuteProcess.executeProcessReturnVector(rpmCommandArray, returnVector, returnErrorVector); diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/LinuxHelper.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/LinuxHelper.java index ebf915c6274a..fc16b5adcf3b 100755 --- a/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/LinuxHelper.java +++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/LinuxHelper.java @@ -383,21 +383,32 @@ import java.util.Vector;public class LinuxHelper { public void investigateDebian(InstallData data) { - // String rpmQuery = "rpm --help; - String[] rpmQueryArray = new String[2]; - rpmQueryArray[0] = "rpm"; - rpmQueryArray[1] = "--help"; + // First check: Is this a Debian system? - Vector returnVector = new Vector(); - Vector returnErrorVector = new Vector(); - int returnValue = ExecuteProcess.executeProcessReturnVector(rpmQueryArray, returnVector, returnErrorVector); + String dpkgFile = "/usr/bin/dpkg"; - // Checking if the return vector contains the string "force-debian" + if ( new File(dpkgFile).exists() ) { - for (int i = 0; i < returnVector.size(); i++) { - String line = (String) returnVector.get(i); - if ( line.indexOf("force-debian") > -1 ) { - data.setIsDebianSystem(true); + data.setIsDebianSystem(true); + + // Second check: If this is a Debian system, is "--force-debian" required? + + // String rpmQuery = "rpm --help; + String[] rpmQueryArray = new String[2]; + rpmQueryArray[0] = "rpm"; + rpmQueryArray[1] = "--help"; + + Vector returnVector = new Vector(); + Vector returnErrorVector = new Vector(); + int returnValue = ExecuteProcess.executeProcessReturnVector(rpmQueryArray, returnVector, returnErrorVector); + + // Checking if the return vector contains the string "force-debian" + + for (int i = 0; i < returnVector.size(); i++) { + String line = (String) returnVector.get(i); + if ( line.indexOf("force-debian") > -1 ) { + data.setUseForceDebian(true); + } } } } -- cgit From df0e1b8fa698daf2a44c6b7b34e7fdd9d27d76f4 Mon Sep 17 00:00:00 2001 From: Ingo Schmidt Date: Tue, 14 Sep 2010 12:00:24 +0200 Subject: native330 #i114487# fixing installation on Cent OS --- javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java | 2 +- .../src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java | 4 ++-- .../JavaSetup/org/openoffice/setup/InstallerHelper/LinuxHelper.java | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java index 74cc40bf08b4..358ebd489db4 100755 --- a/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java +++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java @@ -76,7 +76,7 @@ public class InstallData static private boolean useRtl = false; static private boolean installedProductMinorSet = false; static private boolean isDebianSystem = false; - static private boolean useForceDebian = false; + static private boolean useForceDebian = false; /* --force-debian */ static private boolean debianInvestigated = false; static private String installType; /* custom or typical installation */ static private String osType; /* Linux, SunOS, ... */ diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java index 580911cebc5a..4383904569c0 100755 --- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java +++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java @@ -227,7 +227,7 @@ public class LinuxInstaller extends Installer { } // Defining a Vector that contains the full rpm command. Then the string array can be - // created dynamically. + // created dynamically. Otherwise there would be too many different scenarios. Vector rpmVector = new Vector(); @@ -361,7 +361,7 @@ public class LinuxInstaller extends Installer { } // Defining a Vector that contains the full rpm command. Then the string array can be - // created dynamically. + // created dynamically. Otherwise there would be too many different scenarios. Vector rpmVector = new Vector(); diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/LinuxHelper.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/LinuxHelper.java index fc16b5adcf3b..91e8463fdc03 100755 --- a/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/LinuxHelper.java +++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/LinuxHelper.java @@ -391,7 +391,8 @@ import java.util.Vector;public class LinuxHelper { data.setIsDebianSystem(true); - // Second check: If this is a Debian system, is "--force-debian" required? + // Second check: If this is a Debian system, is "--force-debian" required? Older + // versions do not support "--force-debian". // String rpmQuery = "rpm --help; String[] rpmQueryArray = new String[2]; -- cgit From 43c78860c3c910a43a8be5a0bc4fca1a096f9946 Mon Sep 17 00:00:00 2001 From: sb Date: Tue, 14 Sep 2010 15:14:56 +0200 Subject: sb129: #i113189# removed obviously unnecessary service registrations; allow empty --- extensions/source/oooimprovement/invite_job.cxx | 2 +- extensions/source/oooimprovement/onlogrotate_job.cxx | 2 +- extensions/source/oooimprovement/oooimprovement.component | 12 +++++------- forms/util/frm.component | 4 ---- 4 files changed, 7 insertions(+), 13 deletions(-) diff --git a/extensions/source/oooimprovement/invite_job.cxx b/extensions/source/oooimprovement/invite_job.cxx index 8bf4a3c5d241..69036826432f 100644 --- a/extensions/source/oooimprovement/invite_job.cxx +++ b/extensions/source/oooimprovement/invite_job.cxx @@ -121,7 +121,7 @@ namespace oooimprovement Sequence SAL_CALL InviteJob::getSupportedServiceNames_static() { Sequence aServiceNames(1); - aServiceNames[0] = OUString::createFromAscii("com.sun.star.task.XAsyncJob"); + aServiceNames[0] = OUString::createFromAscii("com.sun.star.task.AsyncJob"); return aServiceNames; } diff --git a/extensions/source/oooimprovement/onlogrotate_job.cxx b/extensions/source/oooimprovement/onlogrotate_job.cxx index a92044b87d7e..5468e51d2616 100644 --- a/extensions/source/oooimprovement/onlogrotate_job.cxx +++ b/extensions/source/oooimprovement/onlogrotate_job.cxx @@ -190,7 +190,7 @@ namespace oooimprovement Sequence SAL_CALL OnLogRotateJob::getSupportedServiceNames_static() { Sequence aServiceNames(1); - aServiceNames[0] = OUString::createFromAscii("com.sun.star.task.XAsyncJob"); + aServiceNames[0] = OUString::createFromAscii("com.sun.star.task.AsyncJob"); return aServiceNames; } diff --git a/extensions/source/oooimprovement/oooimprovement.component b/extensions/source/oooimprovement/oooimprovement.component index ac4d6cca1584..e133f932c199 100644 --- a/extensions/source/oooimprovement/oooimprovement.component +++ b/extensions/source/oooimprovement/oooimprovement.component @@ -28,13 +28,11 @@ - + - - - - - - + + diff --git a/forms/util/frm.component b/forms/util/frm.component index 0305d03ed54e..c727e805940a 100644 --- a/forms/util/frm.component +++ b/forms/util/frm.component @@ -29,18 +29,14 @@ - - - - -- cgit From d70aabb7bda9dc0a4bc14e00e6080a12ef8f238c Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 17 Sep 2010 12:46:27 +0200 Subject: dba33j: #i114273# --- wizards/com/sun/star/wizards/db/DBMetaData.java | 32 +-- .../com/sun/star/wizards/query/QueryWizard.java | 256 +++++++++++++-------- .../com/sun/star/wizards/ui/FilterComponent.java | 171 ++------------ 3 files changed, 175 insertions(+), 284 deletions(-) diff --git a/wizards/com/sun/star/wizards/db/DBMetaData.java b/wizards/com/sun/star/wizards/db/DBMetaData.java index f46c3fd657d4..323ded34385a 100644 --- a/wizards/com/sun/star/wizards/db/DBMetaData.java +++ b/wizards/com/sun/star/wizards/db/DBMetaData.java @@ -38,12 +38,10 @@ import com.sun.star.awt.XWindowPeer; import com.sun.star.beans.PropertyValue; import com.sun.star.beans.UnknownPropertyException; import com.sun.star.beans.XPropertySet; -import com.sun.star.container.XChild; import com.sun.star.container.XHierarchicalNameAccess; import com.sun.star.container.XHierarchicalNameContainer; import com.sun.star.container.XNameAccess; import com.sun.star.container.XNameContainer; -import com.sun.star.frame.XComponentLoader; import com.sun.star.frame.XModel; import com.sun.star.frame.XStorable; import com.sun.star.lang.XComponent; @@ -91,7 +89,6 @@ import java.util.logging.Logger; public class DBMetaData { - private XNameAccess xQueryNames; public XDatabaseMetaData xDBMetaData; private XDataSource m_dataSource; @@ -109,12 +106,8 @@ public class DBMetaData public com.sun.star.lang.XMultiServiceFactory xMSF; public XComponent xConnectionComponent; - private XNameAccess m_xTableNames; - private XInteractionHandler oInteractionHandler; private XNameAccess xNameAccess; private XInterface xDatabaseContext; - private XCompletedConnection xCompleted; - // private int[] nDataTypes = null; private XWindowPeer xWindowPeer; private String[] TableNames = new String[] {}; private String[] QueryNames = new String[] {}; @@ -212,15 +205,13 @@ public class DBMetaData return lDateCorrection; } - void getInterfaces(XMultiServiceFactory xMSF) + private void getInterfaces(XMultiServiceFactory xMSF) { try { this.xMSF = xMSF; xDatabaseContext = (XInterface) xMSF.createInstance("com.sun.star.sdb.DatabaseContext"); xNameAccess = UnoRuntime.queryInterface( XNameAccess.class, xDatabaseContext ); - XInterface xInteractionHandler = (XInterface) xMSF.createInstance("com.sun.star.task.InteractionHandler"); - oInteractionHandler = UnoRuntime.queryInterface( XInteractionHandler.class, xInteractionHandler ); DataSourceNames = xNameAccess.getElementNames(); } catch (Exception exception) @@ -257,7 +248,6 @@ public class DBMetaData public boolean hasTableByName(String _stablename) { - // getTableNames(); return getTableNamesAsNameAccess().hasByName(_stablename); } @@ -371,11 +361,6 @@ public class DBMetaData return bHasEscapeProcessing; } - // public void initCommandNames() - // { - // getTableNames(); - // } - public XNameAccess getQueryNamesAsNameAccess() { XQueriesSupplier xDBQueries = UnoRuntime.queryInterface( XQueriesSupplier.class, DBConnection ); @@ -416,7 +401,7 @@ public class DBMetaData return TableNames; } - void InitializeWidthList() + private void InitializeWidthList() { WidthList = new int[17][2]; WidthList[0][0] = DataType.BIT; // == -7; @@ -581,7 +566,7 @@ public class DBMetaData return m_dataSource; } - private void setDataSourceByName(String _DataSourceName, boolean bgetInterfaces) + private void setDataSourceByName(String _DataSourceName) { try { @@ -601,7 +586,6 @@ public class DBMetaData public void getDataSourceInterfaces() throws Exception { - xCompleted = UnoRuntime.queryInterface( XCompletedConnection.class, getDataSource() ); xDataSourcePropertySet = UnoRuntime.queryInterface( XPropertySet.class, getDataSource() ); bPasswordIsRequired = ((Boolean) xDataSourcePropertySet.getPropertyValue("IsPasswordRequired")).booleanValue(); } @@ -684,8 +668,8 @@ public class DBMetaData private boolean getConnection(String _DataSourceName) { - setDataSourceByName(_DataSourceName, true); - return getConnection( getDataSource() ); + setDataSourceByName(_DataSourceName); + return getConnection( getDataSource() ); } private boolean getConnection(com.sun.star.sdbc.XConnection _DBConnection) @@ -955,7 +939,7 @@ public class DBMetaData NamedValueCollection creationArgs = new NamedValueCollection(); creationArgs.put( "Name", basename ); creationArgs.put( "URL", documentURL ); - creationArgs.put( "AsTemplate", new Boolean( i_createTemplate ) ); + creationArgs.put( "AsTemplate", i_createTemplate ); XMultiServiceFactory xDocMSF = UnoRuntime.queryInterface( XMultiServiceFactory.class, _xDocNameAccess ); Object oDBDocument = xDocMSF.createInstanceWithArguments( "com.sun.star.sdb.DocumentDefinition", creationArgs.getPropertyValues() ); XHierarchicalNameContainer xHier = UnoRuntime.queryInterface( XHierarchicalNameContainer.class, _xDocNameAccess ); @@ -967,7 +951,7 @@ public class DBMetaData } catch (Exception e) { - e.printStackTrace(System.out); + e.printStackTrace(); } } @@ -1103,13 +1087,11 @@ public class DBMetaData public void finish() { xQueryNames = null; - oInteractionHandler = null; xNameAccess = null; xDatabaseContext = null; xDBMetaData = null; m_dataSource = null; xModel = null; - xCompleted = null; xDataSourcePropertySet = null; xWindowPeer = null; DBConnection = null; diff --git a/wizards/com/sun/star/wizards/query/QueryWizard.java b/wizards/com/sun/star/wizards/query/QueryWizard.java index 53fc67f01192..a0970534d657 100644 --- a/wizards/com/sun/star/wizards/query/QueryWizard.java +++ b/wizards/com/sun/star/wizards/query/QueryWizard.java @@ -36,8 +36,10 @@ import com.sun.star.sdbc.SQLException; import com.sun.star.uno.AnyConverter; import com.sun.star.wizards.ui.UIConsts; import com.sun.star.uno.UnoRuntime; +import com.sun.star.wizards.common.Desktop; import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.JavaTools; +import com.sun.star.wizards.common.Properties; import com.sun.star.wizards.common.Resource; import com.sun.star.wizards.db.DatabaseObjectWizard; import com.sun.star.wizards.db.QueryMetaData; @@ -59,15 +61,15 @@ public class QueryWizard extends DatabaseObjectWizard private static final int SOGROUPFILTER_PAGE = 6; private static final int SOTITLES_PAGE = 7; protected static final int SOSUMMARY_PAGE = 8; - private CommandFieldSelection CurDBCommandFieldSelection; - private SortingComponent CurSortingComponent; - private FieldSelection CurGroupFieldSelection; - private TitlesComponent CurTitlesComponent; - private FilterComponent CurFilterComponent; - private FilterComponent CurGroupFilterComponent; - private AggregateComponent CurAggregateComponent; - private Finalizer CurFinalizer; - private QuerySummary CurDBMetaData; + private CommandFieldSelection m_DBCommandFieldSelectio; + private SortingComponent m_sortingComponent; + private FieldSelection m_groupFieldSelection; + private TitlesComponent m_titlesComponent; + private FilterComponent m_filterComponent; + private FilterComponent m_groupFilterComponent; + private AggregateComponent m_aggregateComponent; + private Finalizer m_finalizer; + private QuerySummary m_DBMetaData; private String reslblFieldHeader; private String reslblAliasHeader; private String reslblFields; @@ -82,30 +84,85 @@ public class QueryWizard extends DatabaseObjectWizard { super( xMSF, 40970, i_wizardContext ); addResourceHandler("QueryWizard", "dbw"); - CurDBMetaData = new QuerySummary(xMSF, m_oResource); + m_DBMetaData = new QuerySummary(xMSF, m_oResource); } -/* public static void main(String args[]) + public static void main(String i_args[]) { - String ConnectStr = "uno:pipe,name=foo;urp;StarOffice.ServiceManager"; + final String settings[] = new String[] { null, null, null }; + final int IDX_PIPE_NAME = 0; + final int IDX_LOCATION = 1; + final int IDX_DSN = 2; + + // some simple parsing + boolean failure = false; + int settingsIndex = -1; + for ( int i=0; i= 0 ) + { + settings[ settingsIndex ] = i_args[i]; + settingsIndex = -1; + continue; + } + + if ( i_args[i].equals( "--pipe-name" ) ) + { + settingsIndex = IDX_PIPE_NAME; + continue; + } + + if ( i_args[i].equals( "--database-location" ) ) + { + settingsIndex = IDX_LOCATION; + continue; + } + + if ( i_args[i].equals( "--data-source-name" ) ) + { + settingsIndex = IDX_DSN; + continue; + } + + failure = true; + } + + if ( settings[ IDX_PIPE_NAME ] == null ) + failure = true; + + if ( ( settings[ IDX_DSN ] == null ) && ( settings[ IDX_LOCATION ] == null ) ) + failure = true; + + if ( failure ) + { + System.err.println( "supported arguments: " ); + System.err.println( " --pipe-name : specifies the name of the pipe to connect to the running OOo instance" ); + System.err.println( " --database-location : specifies the URL of the database document to work with" ); + System.err.println( " --data-source-name : specifies the name of the data source to work with" ); + return; + } + + final String ConnectStr = "uno:pipe,name=" + settings[IDX_PIPE_NAME] + ";urp;StarOffice.ServiceManager"; try { - XMultiServiceFactory xLocMSF = Desktop.connect(ConnectStr); - if (xLocMSF != null) + final XMultiServiceFactory serviceFactory = Desktop.connect(ConnectStr); + if (serviceFactory != null) { PropertyValue[] curproperties = new PropertyValue[1]; - curproperties[0] = Properties.createProperty("DatabaseLocation", "file:///G:/temp/abc.odb"); -// curproperties[0] = Properties.createProperty("DataSourceName", "TESTDB"); + if ( settings[ IDX_LOCATION ] != null ) + curproperties[0] = Properties.createProperty( "DatabaseLocation", settings[ IDX_LOCATION ] ); + else + curproperties[0] = Properties.createProperty( "DataSourceName", settings[ IDX_DSN ] ); - QueryWizard CurQueryWizard = new QueryWizard(xLocMSF); - CurQueryWizard.startQueryWizard(xLocMSF, curproperties); + QueryWizard CurQueryWizard = new QueryWizard( serviceFactory, curproperties ); + CurQueryWizard.startQueryWizard(); } } catch (java.lang.Exception jexception) { jexception.printStackTrace(System.out); } - }*/ + } public final XFrame getFrame() { @@ -116,7 +173,7 @@ public class QueryWizard extends DatabaseObjectWizard { try { - if ( CurDBMetaData.getConnection( m_wizardContext ) ) + if ( m_DBMetaData.getConnection( m_wizardContext ) ) { reslblFields = m_oResource.getResText(UIConsts.RID_QUERY + 4); reslblFieldHeader = m_oResource.getResText(UIConsts.RID_QUERY + 19); //Fielnames in AliasComponent @@ -138,11 +195,11 @@ public class QueryWizard extends DatabaseObjectWizard setRightPaneHeaders(m_oResource, UIConsts.RID_QUERY + 70, 8); this.setMaxStep(8); buildSteps(); - this.CurDBCommandFieldSelection.preselectCommand( m_wizardContext, false ); + this.m_DBCommandFieldSelectio.preselectCommand( m_wizardContext, false ); XWindowPeer windowPeer = UnoRuntime.queryInterface( XWindowPeer.class, m_frame.getContainerWindow() ); createWindowPeer(windowPeer); - CurDBMetaData.setWindowPeer(this.xControl.getPeer()); + m_DBMetaData.setWindowPeer(this.xControl.getPeer()); insertQueryRelatedSteps(); executeDialog( m_frame.getContainerWindow().getPosSize() ); } @@ -151,14 +208,14 @@ public class QueryWizard extends DatabaseObjectWizard { jexception.printStackTrace(System.out); } - CurGroupFilterComponent = null; - CurTitlesComponent = null; - CurAggregateComponent = null; - CurDBCommandFieldSelection = null; + m_groupFilterComponent = null; + m_titlesComponent = null; + m_aggregateComponent = null; + m_DBCommandFieldSelectio = null; xWindowPeer = null; - CurFinalizer = null; - CurDBMetaData.finish(); - CurDBMetaData = null; + m_finalizer = null; + m_DBMetaData.finish(); + m_DBMetaData = null; System.gc(); return m_createdQuery; @@ -181,17 +238,17 @@ public class QueryWizard extends DatabaseObjectWizard case SOAGGREGATE_PAGE: if (_bEnabled == true) { - bEnabled = ((CurDBMetaData.hasNumericalFields()) && (CurDBMetaData.xDBMetaData.supportsCoreSQLGrammar())); + bEnabled = ((m_DBMetaData.hasNumericalFields()) && (m_DBMetaData.xDBMetaData.supportsCoreSQLGrammar())); } break; case SOGROUPSELECTION_PAGE: - bEnabled = CurDBMetaData.Type == QueryMetaData.QueryType.SOSUMMARYQUERY; + bEnabled = m_DBMetaData.Type == QueryMetaData.QueryType.SOSUMMARYQUERY; break; case SOGROUPFILTER_PAGE: bEnabled = false; if (_bEnabled == true) { - bEnabled = (CurDBMetaData.GroupByFilterConditions.length > 0); + bEnabled = (m_DBMetaData.GroupByFilterConditions.length > 0); } break; @@ -225,11 +282,11 @@ public class QueryWizard extends DatabaseObjectWizard i = insertRoadmapItem(0, true, SOFIELDSELECTION_PAGE - 1, SOFIELDSELECTION_PAGE); i = insertRoadmapItem(i, false, SOSORTING_PAGE - 1, SOSORTING_PAGE); // Orderby is always supported i = insertRoadmapItem(i, false, SOFILTER_PAGE - 1, SOFILTER_PAGE); - if (CurDBMetaData.xDBMetaData.supportsCoreSQLGrammar()) + if (m_DBMetaData.xDBMetaData.supportsCoreSQLGrammar()) { - i = insertRoadmapItem(i, CurDBMetaData.hasNumericalFields(), SOAGGREGATE_PAGE - 1, SOAGGREGATE_PAGE); + i = insertRoadmapItem(i, m_DBMetaData.hasNumericalFields(), SOAGGREGATE_PAGE - 1, SOAGGREGATE_PAGE); } - if (CurDBMetaData.xDBMetaData.supportsGroupBy()) + if (m_DBMetaData.xDBMetaData.supportsGroupBy()) { i = insertRoadmapItem(i, false, SOGROUPSELECTION_PAGE - 1, SOGROUPSELECTION_PAGE); i = insertRoadmapItem(i, false, SOGROUPFILTER_PAGE - 1, SOGROUPFILTER_PAGE); @@ -251,28 +308,25 @@ public class QueryWizard extends DatabaseObjectWizard { try { -// curDBCommandFieldSelection = new CommandFieldSelection(this, curFormDocument.oMainFormDBMetaData, 92, slblFields, slblSelFields, slblTables, true, 34411); -// curDBCommandFieldSelection.addFieldSelectionListener(new FieldSelectionListener()); - - CurDBCommandFieldSelection = new CommandFieldSelection(this, CurDBMetaData, 120, reslblFields, reslblSelFields, reslblTables, true, 40850); - CurDBCommandFieldSelection.setAppendMode(true); - CurDBCommandFieldSelection.addFieldSelectionListener(new FieldSelectionListener()); - CurSortingComponent = new SortingComponent(this, SOSORTING_PAGE, 95, 27, 210, 40865); - CurFilterComponent = new FilterComponent(this, xMSF, SOFILTER_PAGE, 97, 27, 209, 3, CurDBMetaData, 40878); - CurFilterComponent.addNumberFormats(); + m_DBCommandFieldSelectio = new CommandFieldSelection(this, m_DBMetaData, 120, reslblFields, reslblSelFields, reslblTables, true, 40850); + m_DBCommandFieldSelectio.setAppendMode(true); + m_DBCommandFieldSelectio.addFieldSelectionListener(new FieldSelectionListener()); + m_sortingComponent = new SortingComponent(this, SOSORTING_PAGE, 95, 27, 210, 40865); + m_filterComponent = new FilterComponent(this, xMSF, SOFILTER_PAGE, 97, 27, 209, 3, m_DBMetaData, 40878); + m_filterComponent.addNumberFormats(); - if (CurDBMetaData.xDBMetaData.supportsCoreSQLGrammar()) + if (m_DBMetaData.xDBMetaData.supportsCoreSQLGrammar()) { - CurAggregateComponent = new AggregateComponent(this, CurDBMetaData, SOAGGREGATE_PAGE, 97, 69, 209, 5, 40895); + m_aggregateComponent = new AggregateComponent(this, m_DBMetaData, SOAGGREGATE_PAGE, 97, 69, 209, 5, 40895); } - if (CurDBMetaData.xDBMetaData.supportsGroupBy()) + if (m_DBMetaData.xDBMetaData.supportsGroupBy()) { - CurGroupFieldSelection = new FieldSelection(this, SOGROUPSELECTION_PAGE, 95, 27, 210, 150, reslblFields, this.reslblGroupBy, 40915, false); - CurGroupFieldSelection.addFieldSelectionListener(new FieldSelectionListener()); - CurGroupFilterComponent = new FilterComponent(this, xMSF, SOGROUPFILTER_PAGE, 97, 27, 209, 3, CurDBMetaData, 40923); + m_groupFieldSelection = new FieldSelection(this, SOGROUPSELECTION_PAGE, 95, 27, 210, 150, reslblFields, this.reslblGroupBy, 40915, false); + m_groupFieldSelection.addFieldSelectionListener(new FieldSelectionListener()); + m_groupFilterComponent = new FilterComponent(this, xMSF, SOGROUPFILTER_PAGE, 97, 27, 209, 3, m_DBMetaData, 40923); } - CurTitlesComponent = new TitlesComponent(this, SOTITLES_PAGE, 97, 37, 207, 7, reslblFieldHeader, reslblAliasHeader, 40940); - CurFinalizer = new Finalizer(this, CurDBMetaData); + m_titlesComponent = new TitlesComponent(this, SOTITLES_PAGE, 97, 37, 207, 7, reslblFieldHeader, reslblAliasHeader, 40940); + m_finalizer = new Finalizer(this, m_DBMetaData); enableNavigationButtons(false, false, false); } catch (com.sun.star.uno.Exception exception) @@ -288,10 +342,10 @@ public class QueryWizard extends DatabaseObjectWizard || ( switchToStep( ncurStep, SOSUMMARY_PAGE ) ) ) { - m_createdQuery = CurFinalizer.finish(); + m_createdQuery = m_finalizer.finish(); if ( m_createdQuery.length() > 0 ) { - loadSubComponent( CommandType.QUERY, m_createdQuery, CurFinalizer.displayQueryDesign() ); + loadSubComponent( CommandType.QUERY, m_createdQuery, m_finalizer.displayQueryDesign() ); xDialog.endExecute(); return true; } @@ -305,11 +359,11 @@ public class QueryWizard extends DatabaseObjectWizard { if (nOldStep <= SOGROUPSELECTION_PAGE && nNewStep > SOGROUPSELECTION_PAGE) { - if (CurDBMetaData.xDBMetaData.supportsGroupBy()) + if (m_DBMetaData.xDBMetaData.supportsGroupBy()) { - CurDBMetaData.setGroupFieldNames(CurGroupFieldSelection.getSelectedFieldNames()); - CurDBMetaData.GroupFieldNames = JavaTools.removeOutdatedFields(CurDBMetaData.GroupFieldNames, CurDBMetaData.NonAggregateFieldNames); - CurDBMetaData.GroupByFilterConditions = JavaTools.removeOutdatedFields(CurDBMetaData.GroupByFilterConditions, CurDBMetaData.GroupFieldNames); + m_DBMetaData.setGroupFieldNames(m_groupFieldSelection.getSelectedFieldNames()); + m_DBMetaData.GroupFieldNames = JavaTools.removeOutdatedFields(m_DBMetaData.GroupFieldNames, m_DBMetaData.NonAggregateFieldNames); + m_DBMetaData.GroupByFilterConditions = JavaTools.removeOutdatedFields(m_DBMetaData.GroupByFilterConditions, m_DBMetaData.GroupFieldNames); } } switch (nNewStep) @@ -317,24 +371,24 @@ public class QueryWizard extends DatabaseObjectWizard case SOFIELDSELECTION_PAGE: break; case SOSORTING_PAGE: - CurSortingComponent.initialize(CurDBMetaData.getDisplayFieldNames(), CurDBMetaData.getSortFieldNames()); + m_sortingComponent.initialize(m_DBMetaData.getDisplayFieldNames(), m_DBMetaData.getSortFieldNames()); break; case SOFILTER_PAGE: - CurFilterComponent.initialize(CurDBMetaData.getFilterConditions(), CurDBMetaData.getDisplayFieldNames()); + m_filterComponent.initialize(m_DBMetaData.getFilterConditions(), m_DBMetaData.getDisplayFieldNames()); break; case SOAGGREGATE_PAGE: - CurAggregateComponent.initialize(); + m_aggregateComponent.initialize(); break; case SOGROUPSELECTION_PAGE: break; case SOGROUPFILTER_PAGE: - CurGroupFilterComponent.initialize(CurDBMetaData.GroupByFilterConditions, CurDBMetaData.getGroupFieldNames()); + m_groupFilterComponent.initialize(m_DBMetaData.GroupByFilterConditions, m_DBMetaData.getGroupFieldNames()); break; case SOTITLES_PAGE: - CurTitlesComponent.initialize(CurDBMetaData.getDisplayFieldNames(), CurDBMetaData.FieldTitleSet); + m_titlesComponent.initialize(m_DBMetaData.getDisplayFieldNames(), m_DBMetaData.FieldTitleSet); break; case SOSUMMARY_PAGE: - CurFinalizer.initialize(); + m_finalizer.initialize(); break; default: break; @@ -351,27 +405,27 @@ public class QueryWizard extends DatabaseObjectWizard switch (nOldStep) { case SOFIELDSELECTION_PAGE: - CurDBMetaData.reorderFieldColumns(CurDBCommandFieldSelection.getSelectedFieldNames()); - CurDBMetaData.initializeFieldTitleSet(true); - CurDBMetaData.setNumericFields(); + m_DBMetaData.reorderFieldColumns(m_DBCommandFieldSelectio.getSelectedFieldNames()); + m_DBMetaData.initializeFieldTitleSet(true); + m_DBMetaData.setNumericFields(); searchForOutdatedFields(); break; case SOSORTING_PAGE: - CurDBMetaData.setSortFieldNames(CurSortingComponent.getSortFieldNames()); + m_DBMetaData.setSortFieldNames(m_sortingComponent.getSortFieldNames()); break; case SOFILTER_PAGE: - CurDBMetaData.setFilterConditions(CurFilterComponent.getFilterConditions()); + m_DBMetaData.setFilterConditions(m_filterComponent.getFilterConditions()); break; case SOAGGREGATE_PAGE: - CurDBMetaData.AggregateFieldNames = CurAggregateComponent.getAggregateFieldNames(); + m_DBMetaData.AggregateFieldNames = m_aggregateComponent.getAggregateFieldNames(); break; case SOGROUPSELECTION_PAGE: break; case SOGROUPFILTER_PAGE: - CurDBMetaData.setGroupByFilterConditions(this.CurGroupFilterComponent.getFilterConditions()); + m_DBMetaData.setGroupByFilterConditions(this.m_groupFilterComponent.getFilterConditions()); break; case SOTITLES_PAGE: - CurDBMetaData.setFieldTitles(CurTitlesComponent.getFieldTitles()); + m_DBMetaData.setFieldTitles(m_titlesComponent.getFieldTitles()); break; case SOSUMMARY_PAGE: break; @@ -382,15 +436,15 @@ public class QueryWizard extends DatabaseObjectWizard { try { - if (CurDBMetaData.Type == QueryMetaData.QueryType.SOSUMMARYQUERY) + if (m_DBMetaData.Type == QueryMetaData.QueryType.SOSUMMARYQUERY) { - if (CurDBMetaData.xDBMetaData.supportsGroupBy()) + if (m_DBMetaData.xDBMetaData.supportsGroupBy()) { - CurDBMetaData.setNonAggregateFieldNames(); - CurGroupFieldSelection.initialize(CurDBMetaData.getUniqueAggregateFieldNames(), false, CurDBMetaData.xDBMetaData.getMaxColumnsInGroupBy()); - CurGroupFieldSelection.intializeSelectedFields(CurDBMetaData.NonAggregateFieldNames); - CurGroupFieldSelection.setMultipleMode(false); - setStepEnabled(SOGROUPFILTER_PAGE, CurAggregateComponent.isGroupingpossible() && CurDBMetaData.NonAggregateFieldNames.length > 0); + m_DBMetaData.setNonAggregateFieldNames(); + m_groupFieldSelection.initialize(m_DBMetaData.getUniqueAggregateFieldNames(), false, m_DBMetaData.xDBMetaData.getMaxColumnsInGroupBy()); + m_groupFieldSelection.intializeSelectedFields(m_DBMetaData.NonAggregateFieldNames); + m_groupFieldSelection.setMultipleMode(false); + setStepEnabled(SOGROUPFILTER_PAGE, m_aggregateComponent.isGroupingpossible() && m_DBMetaData.NonAggregateFieldNames.length > 0); } } } @@ -403,18 +457,18 @@ public class QueryWizard extends DatabaseObjectWizard private void searchForOutdatedFields() { - String[] sFieldNames = CurDBMetaData.getFieldNames(); - String[][] sRemovedFields = JavaTools.removeOutdatedFields(CurDBMetaData.getSortFieldNames(), sFieldNames); - CurDBMetaData.setSortFieldNames(sRemovedFields); - CurDBMetaData.setFilterConditions(JavaTools.removeOutdatedFields(CurDBMetaData.getFilterConditions(), sFieldNames)); - CurDBMetaData.AggregateFieldNames = JavaTools.removeOutdatedFields(CurDBMetaData.AggregateFieldNames, sFieldNames); + String[] sFieldNames = m_DBMetaData.getFieldNames(); + String[][] sRemovedFields = JavaTools.removeOutdatedFields(m_DBMetaData.getSortFieldNames(), sFieldNames); + m_DBMetaData.setSortFieldNames(sRemovedFields); + m_DBMetaData.setFilterConditions(JavaTools.removeOutdatedFields(m_DBMetaData.getFilterConditions(), sFieldNames)); + m_DBMetaData.AggregateFieldNames = JavaTools.removeOutdatedFields(m_DBMetaData.AggregateFieldNames, sFieldNames); } private void enableWizardSteps(String[] NewItems) { boolean bEnabled = NewItems.length > 0; - setControlProperty("btnWizardNext", "Enabled", new Boolean(bEnabled)); - setControlProperty("btnWizardFinish", "Enabled", new Boolean(bEnabled)); + setControlProperty("btnWizardNext", "Enabled", bEnabled); + setControlProperty("btnWizardFinish", "Enabled", bEnabled); enableRoadmapItems(NewItems, bEnabled); // Note: Performancewise this could be improved } @@ -446,15 +500,15 @@ public class QueryWizard extends DatabaseObjectWizard { if (ID == 1) { - CurDBMetaData.addSeveralFieldColumns(SelItems, CurDBCommandFieldSelection.getSelectedCommandName()); + m_DBMetaData.addSeveralFieldColumns(SelItems, m_DBCommandFieldSelectio.getSelectedCommandName()); enableWizardSteps(NewItems); - CurDBCommandFieldSelection.changeSelectedFieldNames(CurDBMetaData.getDisplayFieldNames()); - CurDBCommandFieldSelection.toggleCommandListBox(NewItems); + m_DBCommandFieldSelectio.changeSelectedFieldNames(m_DBMetaData.getDisplayFieldNames()); + m_DBCommandFieldSelectio.toggleCommandListBox(NewItems); } else { - boolean bEnabled = (CurGroupFieldSelection.getSelectedFieldNames().length > 0); - Helper.setUnoPropertyValue(getRoadmapItemByID(SOGROUPFILTER_PAGE), "Enabled", new Boolean(bEnabled)); + boolean bEnabled = (m_groupFieldSelection.getSelectedFieldNames().length > 0); + Helper.setUnoPropertyValue(getRoadmapItemByID(SOGROUPFILTER_PAGE), "Enabled", bEnabled); } } @@ -464,30 +518,30 @@ public class QueryWizard extends DatabaseObjectWizard if (ID == 1) { enableWizardSteps(NewItems); - String[] sSelfieldNames = CurDBMetaData.getFieldNames(SelItems, CurDBCommandFieldSelection.getSelectedCommandName()); - CurDBCommandFieldSelection.addItemsToFieldsListbox(sSelfieldNames); - CurDBMetaData.removeSeveralFieldColumnsByDisplayFieldName(SelItems); - CurDBCommandFieldSelection.toggleCommandListBox(NewItems); + String[] sSelfieldNames = m_DBMetaData.getFieldNames(SelItems, m_DBCommandFieldSelectio.getSelectedCommandName()); + m_DBCommandFieldSelectio.addItemsToFieldsListbox(sSelfieldNames); + m_DBMetaData.removeSeveralFieldColumnsByDisplayFieldName(SelItems); + m_DBCommandFieldSelectio.toggleCommandListBox(NewItems); } else { - boolean bEnabled = (CurGroupFieldSelection.getSelectedFieldNames().length > 0); + boolean bEnabled = (m_groupFieldSelection.getSelectedFieldNames().length > 0); String CurDisplayFieldName = SelItems[0]; - if (JavaTools.FieldInList(CurDBMetaData.NonAggregateFieldNames, CurDisplayFieldName) > -1) + if (JavaTools.FieldInList(m_DBMetaData.NonAggregateFieldNames, CurDisplayFieldName) > -1) { showMessageBox("ErrorBox", VclWindowPeerAttribute.OK, resmsgNonNumericAsGroupBy); - CurGroupFieldSelection.xSelectedFieldsListBox.addItems(SelItems, CurGroupFieldSelection.xSelectedFieldsListBox.getItemCount()); - String FieldList[] = CurGroupFieldSelection.xFieldsListBox.getItems(); + m_groupFieldSelection.xSelectedFieldsListBox.addItems(SelItems, m_groupFieldSelection.xSelectedFieldsListBox.getItemCount()); + String FieldList[] = m_groupFieldSelection.xFieldsListBox.getItems(); int index = JavaTools.FieldInList(FieldList, CurDisplayFieldName); if (index > -1) { - CurGroupFieldSelection.xFieldsListBox.removeItems((short) index, (short) 1); + m_groupFieldSelection.xFieldsListBox.removeItems((short) index, (short) 1); } } else { - Helper.setUnoPropertyValue(getRoadmapItemByID(SOGROUPFILTER_PAGE), "Enabled", new Boolean(bEnabled)); + Helper.setUnoPropertyValue(getRoadmapItemByID(SOGROUPFILTER_PAGE), "Enabled", bEnabled); } } } diff --git a/wizards/com/sun/star/wizards/ui/FilterComponent.java b/wizards/com/sun/star/wizards/ui/FilterComponent.java index 85b797d3b640..4720b40ca55f 100644 --- a/wizards/com/sun/star/wizards/ui/FilterComponent.java +++ b/wizards/com/sun/star/wizards/ui/FilterComponent.java @@ -40,18 +40,17 @@ import com.sun.star.beans.XPropertySet; import com.sun.star.lang.EventObject; import com.sun.star.lang.IllegalArgumentException; import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.lib.uno.helper.PropertySet; import com.sun.star.sdbc.DataType; import com.sun.star.uno.Any; import com.sun.star.uno.AnyConverter; import com.sun.star.uno.Exception; import com.sun.star.uno.Type; +import com.sun.star.uno.TypeClass; import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.XInterface; import com.sun.star.wizards.common.NumberFormatter; import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.JavaTools; -import com.sun.star.wizards.common.Properties; import com.sun.star.wizards.db.FieldColumn; import com.sun.star.wizards.db.QueryMetaData; import java.util.logging.Level; @@ -61,19 +60,9 @@ public class FilterComponent { private Integer IStep; - // private int iStartPosX; - // private int iStartPosY; - // int Count; private int RowCount; - // private int FilterCount; private static String[] sLogicOperators; - private static String[] sBooleanValues; - // private /* public */ String[] FieldNames; - private XRadioButton optMatchAll; private XRadioButton optMatchAny; - // private String soptMatchAll; - // private String soptMatchAny; - // private String[] sHeadLines; private String slblFieldNames; private String slblOperators; private String slblValue; @@ -81,7 +70,6 @@ public class FilterComponent private int BaseID = 2300; private String sIncSuffix; private ControlRow[] oControlRows; - // private Vector FilterNames; private String sDuplicateCondition; final int SOOPTORMODE = 100; final int SOOPTANDMODE = 101; @@ -127,7 +115,6 @@ public class FilterComponent final int SO_OPTQUERYMODE = 5; int SOI_MATCHALL = 0; int SOI_MATCHANY = 1; - // int ifilterstate = SOI_MATCHALL; int curHelpID; class ItemListenerImpl implements com.sun.star.awt.XItemListener @@ -139,8 +126,6 @@ public class FilterComponent String sControlName = ""; switch (iKey) { - // case SOOPTQUERYMODE: - // getfilterstate(); case SO_FIRSTFIELDNAME: case SO_SECONDFIELDNAME: case SO_THIRDFIELDNAME: @@ -152,24 +137,11 @@ public class FilterComponent FieldColumn CurFieldColumn = new FieldColumn(oQueryMetaData, CurDisplayFieldName); String sControlNameTextValue = "txtValue" + sControlNameSuffix; -// String sControlNameBooleanList = "lstBoolean" + sControlNameSuffix; -// if (aFieldColumn.FieldType == DataType.BOOLEAN) -// { -// // scheint aufgrund eines Fehlers in Toolkit nicht zu funktionieren -// CurUnoDialog.setControlVisible(sControlNameTextValue, false); -// CurUnoDialog.setControlVisible(sControlNameBooleanList, true); -// } -// else -// { -// CurUnoDialog.setControlVisible(sControlNameTextValue, true); -// CurUnoDialog.setControlVisible(sControlNameBooleanList, false); - XControl xValueControl = CurUnoDialog.xDlgContainer.getControl(sControlNameTextValue); XInterface xValueModel = (XInterface) UnoDialog.getModel(xValueControl); Helper.setUnoPropertyValue(xValueModel, "TreatAsNumber", Boolean.valueOf(CurFieldColumn.isNumberFormat())); final NumberFormatter aNumberFormatter = oQueryMetaData.getNumberFormatter(); aNumberFormatter.setNumberFormat(xValueModel, CurFieldColumn.getDBFormatKey(), aNumberFormatter); -// } break; case SO_FIRSTCONDITION: @@ -180,7 +152,6 @@ public class FilterComponent break; case SOOPTORMODE: case SOOPTANDMODE: - // getfilterstate(); return; case SO_FIRSTBOOLFIELDNAME: @@ -210,24 +181,6 @@ public class FilterComponent togglefollowingControlRow(sName); } - public void disposing(EventObject EventObject) - { - } - } - - public void fieldconditionchanged(ItemEvent EventObject) - { - String sName = getControlName(EventObject.Source); - togglefollowingControlRow(sName); - } - - public void disposing(com.sun.star.lang.EventObject eventObject) - { - } - - class ActionListenerImpl implements com.sun.star.awt.XActionListener - { - public void disposing(EventObject eventObject) { } @@ -291,18 +244,19 @@ public class FilterComponent column.addProperty("Type", PropertyAttribute.BOUND, DataType.VARCHAR); column.addProperty("Name", PropertyAttribute.BOUND, ""); + column.addProperty("Value", (short)( PropertyAttribute.MAYBEVOID | PropertyAttribute.REMOVABLE ), null ); final XPropertySet columnSet = UnoRuntime.queryInterface(XPropertySet.class, column); if ( oQueryMetaData.getSQLQueryComposer().getQuery().length() == 0) { final String fromClause = oQueryMetaData.getSQLQueryComposer().getFromClause(); - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); sql.append(oQueryMetaData.getSQLQueryComposer().getSelectClause(true)); sql.append(' '); sql.append(fromClause); oQueryMetaData.getSQLQueryComposer().getQueryComposer().setElementaryQuery(sql.toString()); } - int a = 0; + oQueryMetaData.getSQLQueryComposer().getQueryComposer().setStructuredFilter( new PropertyValue[][] {} ); for (int i = 0; i < RowCount; i++) { ControlRow CurControlRow = oControlRows[i]; @@ -323,12 +277,14 @@ public class FilterComponent value = ((Double)value) - oQueryMetaData.getNullDateCorrection(); break; } - column.addProperty("Value", PropertyAttribute.MAYBEVOID, value); + column.removeProperty( "Value" ); + column.addProperty("Value", (short)( PropertyAttribute.MAYBEVOID | PropertyAttribute.REMOVABLE ), value ); columnSet.setPropertyValue("Value", value); oQueryMetaData.getSQLQueryComposer().getQueryComposer().appendFilterByColumn(columnSet, getfilterstate() == this.SOI_MATCHALL,nOperator); } } } + final String test = oQueryMetaData.getSQLQueryComposer().getQueryComposer().getQuery(); filterconditions = oQueryMetaData.getSQLQueryComposer().getQueryComposer().getStructuredFilter(); int[] iduplicate = JavaTools.getDuplicateFieldIndex(filterconditions); if (iduplicate[0] != -1) @@ -337,9 +293,7 @@ public class FilterComponent String smsgDuplicateCondition = getDisplayCondition(sDuplicateCondition, aduplicatecondition, null); CurUnoDialog.showMessageBox("WarningBox", VclWindowPeerAttribute.OK, smsgDuplicateCondition); CurUnoDialog.vetoableChange(new java.beans.PropertyChangeEvent(CurUnoDialog, "Steps", Integer.valueOf(1), Integer.valueOf(2))); - return new PropertyValue[][] - { - }; + return new PropertyValue[][]{}; } } catch (Exception ex) @@ -402,22 +356,6 @@ public class FilterComponent return ifilterstate; } - private void addfiltercondition(int _index, String _curFieldName, Object _curValue, int _curOperator) - { - String ValString = String.valueOf(_curValue); - PropertyValue oPropertyValue = Properties.createProperty(_curFieldName, ValString, _curOperator); - getfilterstate(); - if (getfilterstate() == this.SOI_MATCHALL) - { - if (_index == 0) - { - filterconditions[0] = new PropertyValue[getFilterCount()]; - } - filterconditions[0][_index] = new PropertyValue(); - filterconditions[0][_index] = oPropertyValue; - } - } - private int getFilterCount() { int a = 0; @@ -429,8 +367,6 @@ public class FilterComponent } } return a; - // FilterCount = a; - // return FilterCount; } /** Creates a new instance of FilterComponent @@ -456,8 +392,6 @@ public class FilterComponent this.oQueryMetaData = _oQueryMetaData; boolean bEnabled; sIncSuffix = com.sun.star.wizards.common.Desktop.getIncrementSuffix(CurUnoDialog.getDlgNameAccess(), "optMatchAll"); - // iStartPosX = iPosX; - // iStartPosY = iPosY; String soptMatchAll = CurUnoDialog.m_oResource.getResText(BaseID + 9); String soptMatchAny = CurUnoDialog.m_oResource.getResText(BaseID + 10); @@ -465,14 +399,13 @@ public class FilterComponent slblOperators = CurUnoDialog.m_oResource.getResText(BaseID + 24); slblValue = CurUnoDialog.m_oResource.getResText(BaseID + 25); sLogicOperators = CurUnoDialog.m_oResource.getResArray(BaseID + 26, 10 /* 7 */); // =, <>, <, >, <=, >=, like, !like, is null, !is null - sBooleanValues = CurUnoDialog.m_oResource.getResArray(BaseID + 36, 2); // true, false sDuplicateCondition = CurUnoDialog.m_oResource.getResText(BaseID + 89); // create Radiobuttons // * match all // * match one - optMatchAll = CurUnoDialog.insertRadioButton("optMatchAll" + sIncSuffix, SOOPTANDMODE, new ItemListenerImpl(), + CurUnoDialog.insertRadioButton("optMatchAll" + sIncSuffix, SOOPTANDMODE, new ItemListenerImpl(), new String[] { "Height", @@ -533,13 +466,6 @@ public class FilterComponent public void initialize(PropertyValue[][] _filterconditions, String[] _fieldnames) { - // String aFieldNamesWithAdditionalEmpty[] = new String[_fieldnames.length + 1]; - // for (int i = 0; i < _fieldnames.length; i++) - // { - // aFieldNamesWithAdditionalEmpty[i] = _fieldnames[i]; - // } - // aFieldNamesWithAdditionalEmpty[_fieldnames.length] = ""; - int i; for (i = 0; i < RowCount; i++) { @@ -592,7 +518,7 @@ public class FilterComponent // // // ------------------------------------------------------------------------- - class ControlRow + final class ControlRow { private final static int SOLSTFIELDNAME = 3; @@ -775,30 +701,6 @@ public class FilterComponent Short.valueOf(curtabindex++), Integer.valueOf(nValueWidth) }); - -// ControlElements[6] = CurUnoDialog.insertListBox((new StringBuilder()).append("lstBoolean").append(sCompSuffix).toString(), SO_BOOLEANLIST[Index], null, new ItemListenerImpl(), new String[] { -// "Enabled", -// "Dropdown", -// "Height", -// "HelpURL", -// "LineCount", -// "PositionX", "PositionY", -// "Step", -// "StringItemList", -// "TabIndex", -// "Width" -// }, new Object[] { -// new Boolean(bEnabled), -// Boolean.TRUE, -// new Integer(13), -// "HID:" + _firstRowHelpID++, -// new Short((short) 2), -// new Integer(nPosX3 + 44), new Integer(iCompPosY + 23), -// IStep, -// FilterComponent.sBooleanValues, -// new Short(curtabindex++), -// new Integer(nValueWidth) -// }); } catch (Exception exception) { @@ -843,13 +745,6 @@ public class FilterComponent String sValue = (String.valueOf(oValue)); return (!sValue.equals("")); } -// String sBoolValue=""; -// short aSelectedBoolValue[] = (short[])Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[6]), "SelectedItems"); -// if (aSelectedBoolValue.length > 0) -// { -// sBoolValue = String.valueOf(aSelectedBoolValue[0] == 1); -// return !sBoolValue.equals(""); -// } } } return false; @@ -861,16 +756,10 @@ public class FilterComponent } } - private void fieldnamechanged(ItemEvent EventObject) - { - int i = 0; - } - protected void setCondition(PropertyValue _filtercondition) { try { - int ikey; XListBox xFieldsListBox = (XListBox) UnoRuntime.queryInterface(XListBox.class, ControlElements[SOLSTFIELDNAME]); xFieldsListBox.selectItem(_filtercondition.Name, true); XListBox xOperatorListBox = (XListBox) UnoRuntime.queryInterface(XListBox.class, ControlElements[SOLSTOPERATOR]); @@ -940,8 +829,8 @@ public class FilterComponent private void settovoid() { - CurUnoDialog.deselectListBox(ControlElements[SOLSTFIELDNAME]); - CurUnoDialog.deselectListBox(ControlElements[SOLSTOPERATOR]); + WizardDialog.deselectListBox(ControlElements[SOLSTFIELDNAME]); + WizardDialog.deselectListBox(ControlElements[SOLSTOPERATOR]); Helper.setUnoPropertyValue(UnoDialog.getModel(ControlElements[SOTXTVALUE]), "EffectiveValue", com.sun.star.uno.Any.VOID); } @@ -976,7 +865,7 @@ public class FilterComponent } else if (!isConditionComplete()) { - CurUnoDialog.deselectListBox(ControlElements[SOLSTOPERATOR]); + WizardDialog.deselectListBox(ControlElements[SOLSTOPERATOR]); } } @@ -1053,37 +942,3 @@ public class FilterComponent } } } -// com.sun.star.sdb.SQLFilterOperator.EQUAL -// com.sun.star.sdb.SQLFilterOperator.NOT_EQUAL -// com.sun.star.sdb.SQLFilterOperator.LESS -// com.sun.star.sdb.SQLFilterOperator.GREATER -// com.sun.star.sdb.SQLFilterOperator.LESS_EQUAL -// com.sun.star.sdb.SQLFilterOperator.GREATER_EQUAL -// com.sun.star.sdb.SQLFilterOperator.LIKE -// com.sun.star.sdb.SQLFilterOperator.NOT_LIKE -// com.sun.star.sdb.SQLFilterOperator.SQLNULL -// com.sun.star.sdb.SQLFilterOperator.NOT_SQLNULL - -/* constants SQLFilterOperator -{ -/// equal to -const long EQUAL = 1; -/// not equal to -const long NOT_EQUAL = 2; -/// less than -const long LESS = 3; -/// greater than -const long GREATER = 4; -/// less or eqal than -const long LESS_EQUAL = 5; -/// greater or eqal than -const long GREATER_EQUAL = 6; -/// like -const long LIKE = 7; -/// not like -const long NOT_LIKE = 8; -/// is null -const long SQLNULL = 9; -/// is not null -const long NOT_SQLNULL = 10; -}; */ -- cgit From 811df1cfc3f4ce7fbb6fa62e18119920aa9755aa Mon Sep 17 00:00:00 2001 From: Ingo Schmidt Date: Fri, 17 Sep 2010 14:48:05 +0200 Subject: native330 #i113835# fix --- setup_native/scripts/admin.pl | 1 - 1 file changed, 1 deletion(-) diff --git a/setup_native/scripts/admin.pl b/setup_native/scripts/admin.pl index 3e058af172f6..ea186f5a8ba4 100644 --- a/setup_native/scripts/admin.pl +++ b/setup_native/scripts/admin.pl @@ -66,7 +66,6 @@ sub usage { print < Date: Mon, 20 Sep 2010 13:13:18 +0200 Subject: vcl115: #i114425# fix a possible dangling reference (thanks dtardon!) --- forms/source/component/Currency.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/forms/source/component/Currency.cxx b/forms/source/component/Currency.cxx index 89a3b93b4a43..c08d4ea3e36c 100644 --- a/forms/source/component/Currency.cxx +++ b/forms/source/component/Currency.cxx @@ -104,7 +104,8 @@ void OCurrencyModel::implConstruct() try { // get the system international informations - const LocaleDataWrapper& aLocaleInfo = SvtSysLocale().GetLocaleData(); + const SvtSysLocale aSysLocale; + const LocaleDataWrapper& aLocaleInfo = aSysLocale.GetLocaleData(); ::rtl::OUString sCurrencySymbol; sal_Bool bPrependCurrencySymbol; -- cgit From b952a10ddcc3f832c5e129ed4e604eec6ae78939 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 20 Sep 2010 14:22:44 +0200 Subject: dba33j: #i114566# +getNormalizedStructuredFilter --- .../sun/star/wizards/db/DatabaseObjectWizard.java | 3 +- .../com/sun/star/wizards/db/SQLQueryComposer.java | 82 ++++++++++++++++++---- .../com/sun/star/wizards/ui/FilterComponent.java | 51 ++++++++------ 3 files changed, 101 insertions(+), 35 deletions(-) diff --git a/wizards/com/sun/star/wizards/db/DatabaseObjectWizard.java b/wizards/com/sun/star/wizards/db/DatabaseObjectWizard.java index 5c65d73794f0..e03323c6ebbc 100644 --- a/wizards/com/sun/star/wizards/db/DatabaseObjectWizard.java +++ b/wizards/com/sun/star/wizards/db/DatabaseObjectWizard.java @@ -57,7 +57,8 @@ public abstract class DatabaseObjectWizard extends WizardDialog { try { - m_docUI.loadComponent( i_type, i_name, i_forEditing ); + if ( m_docUI != null ) + m_docUI.loadComponent( i_type, i_name, i_forEditing ); } catch ( IllegalArgumentException ex ) { diff --git a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java index 0a52f6a3a7a9..235da2d7c04a 100644 --- a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java +++ b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java @@ -47,6 +47,7 @@ import com.sun.star.uno.UnoRuntime; import com.sun.star.sdbc.SQLException; import com.sun.star.lang.XInitialization; import com.sun.star.awt.XWindow; +import com.sun.star.sdb.SQLFilterOperator; import com.sun.star.wizards.common.*; @@ -60,7 +61,7 @@ public class SQLQueryComposer // String m_sFromClause; public XSingleSelectQueryAnalyzer m_xQueryAnalyzer; Vector composedCommandNames = new Vector(1); - private XSingleSelectQueryComposer m_xQueryComposer; + private XSingleSelectQueryComposer m_queryComposer; XMultiServiceFactory xMSF; boolean bincludeGrouping = true; @@ -72,7 +73,7 @@ public class SQLQueryComposer xMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, CurDBMetaData.DBConnection); final Object oQueryComposer = xMSF.createInstance("com.sun.star.sdb.SingleSelectQueryComposer"); m_xQueryAnalyzer = (XSingleSelectQueryAnalyzer) UnoRuntime.queryInterface(XSingleSelectQueryAnalyzer.class, oQueryComposer); - m_xQueryComposer = (XSingleSelectQueryComposer) UnoRuntime.queryInterface(XSingleSelectQueryComposer.class, m_xQueryAnalyzer); + m_queryComposer = (XSingleSelectQueryComposer) UnoRuntime.queryInterface(XSingleSelectQueryComposer.class, m_xQueryAnalyzer); XSQLQueryComposerFactory xSQLComposerFactory; xSQLComposerFactory = (XSQLQueryComposerFactory) UnoRuntime.queryInterface(XSQLQueryComposerFactory.class, CurDBMetaData.DBConnection); // /* XSQLQueryComposer */ xSQLQueryComposer = xSQLComposerFactory.createQueryComposer(); @@ -160,7 +161,7 @@ public class SQLQueryComposer { for (int i = 0; i < CurDBMetaData.getFilterConditions().length; i++) { - m_xQueryComposer.setStructuredFilter(CurDBMetaData.getFilterConditions()); + m_queryComposer.setStructuredFilter(CurDBMetaData.getFilterConditions()); } } catch (Exception exception) @@ -172,7 +173,7 @@ public class SQLQueryComposer public void prependSortingCriteria() throws SQLException { XIndexAccess xColumnIndexAccess = m_xQueryAnalyzer.getOrderColumns(); - m_xQueryComposer.setOrder(""); + m_queryComposer.setOrder(""); for (int i = 0; i < CurDBMetaData.getSortFieldNames().length; i++) { appendSortingCriterion(i, false); @@ -186,7 +187,7 @@ public class SQLQueryComposer if (JavaTools.FieldInTable(CurDBMetaData.getSortFieldNames(), sName) == -1) { boolean bascend = AnyConverter.toBoolean(xColumnPropertySet.getPropertyValue("IsAscending")); - m_xQueryComposer.appendOrderByColumn(xColumnPropertySet, bascend); + m_queryComposer.appendOrderByColumn(xColumnPropertySet, bascend); } } catch (Exception e) @@ -203,13 +204,13 @@ public class SQLQueryComposer String sSort = CurDBMetaData.getSortFieldNames()[_SortIndex][1]; boolean bascend = (sSort.equals("ASC")); - m_xQueryComposer.appendOrderByColumn(xColumn, bascend); + m_queryComposer.appendOrderByColumn(xColumn, bascend); } public void appendSortingcriteria(boolean _baddAliasFieldNames) throws SQLException { String sOrder = ""; - m_xQueryComposer.setOrder(""); + m_queryComposer.setOrder(""); for (int i = 0; i < CurDBMetaData.getSortFieldNames().length; i++) { String sSortValue = CurDBMetaData.getSortFieldNames()[i][0]; @@ -223,7 +224,7 @@ public class SQLQueryComposer } sOrder += CurDBMetaData.AggregateFieldNames[iAggregate][1] + "(" + CurDBMetaData.AggregateFieldNames[iAggregate][0] + ")"; sOrder += " " + CurDBMetaData.getSortFieldNames()[i][1]; - m_xQueryComposer.setOrder(sOrder); + m_queryComposer.setOrder(sOrder); } else { @@ -232,7 +233,7 @@ public class SQLQueryComposer sOrder = m_xQueryAnalyzer.getOrder(); } // just for debug! - sOrder = m_xQueryComposer.getOrder(); + sOrder = m_queryComposer.getOrder(); int dummy = 0; } @@ -241,7 +242,7 @@ public class SQLQueryComposer for (int i = 0; i < CurDBMetaData.GroupFieldNames.length; i++) { XPropertySet xColumn = CurDBMetaData.getColumnObjectByFieldName(CurDBMetaData.GroupFieldNames[i], _baddAliasFieldNames); - m_xQueryComposer.appendGroupByColumn(xColumn); + m_queryComposer.appendGroupByColumn(xColumn); } String s = m_xQueryAnalyzer.getQuery(); } @@ -309,7 +310,7 @@ public class SQLQueryComposer if (CurDBMetaData.getFilterConditions().length > 0) { CurDBMetaData.setFilterConditions(replaceConditionsByAlias(CurDBMetaData.getFilterConditions())); - m_xQueryComposer.setStructuredFilter(CurDBMetaData.getFilterConditions()); + m_queryComposer.setStructuredFilter(CurDBMetaData.getFilterConditions()); } } } @@ -319,7 +320,7 @@ public class SQLQueryComposer appendGroupByColumns(_baddAliasFieldNames); if (CurDBMetaData.GroupByFilterConditions.length > 0) { - m_xQueryComposer.setStructuredHavingClause(CurDBMetaData.GroupByFilterConditions); + m_queryComposer.setStructuredHavingClause(CurDBMetaData.GroupByFilterConditions); } } appendSortingcriteria(_baddAliasFieldNames); @@ -426,8 +427,63 @@ public class SQLQueryComposer typeexception.printStackTrace(System.out); } } + + /** + * retrieves a normalized structured filter + * + *

XSingleSelectQueryComposer.getStructuredFilter has a strange habit of returning the predicate (equal, not equal, etc) + * effectively twice: Once as SQLFilterOperator, and once in the value. That is, if you have a term "column <> 3", then + * you'll get an SQLFilterOperator.NOT_EQUAL (which is fine), and the textual value of the condition + * will read "<> 3". The latter is strange enough, but even more strange is that this behavior is not even consistent: + * for SQLFilterOperator.EQUAL, the "=" sign is not include in the textual value.

+ * + *

To abstract from this weirdness, use this function here, which strips the unwanted tokens from the textual value + * representation.

+ */ + public PropertyValue[][] getNormalizedStructuredFilter() + { + final PropertyValue[][] structuredFilter = m_queryComposer.getStructuredFilter(); + for ( int i=0; i 0) { + final SQLQueryComposer composer = oQueryMetaData.getSQLQueryComposer(); try { final String serviceName = "com.sun.star.beans.PropertyBag"; @@ -247,29 +248,29 @@ public class FilterComponent column.addProperty("Value", (short)( PropertyAttribute.MAYBEVOID | PropertyAttribute.REMOVABLE ), null ); final XPropertySet columnSet = UnoRuntime.queryInterface(XPropertySet.class, column); - if ( oQueryMetaData.getSQLQueryComposer().getQuery().length() == 0) + if ( composer.getQuery().length() == 0) { - final String fromClause = oQueryMetaData.getSQLQueryComposer().getFromClause(); + final String fromClause = composer.getFromClause(); StringBuilder sql = new StringBuilder(); - sql.append(oQueryMetaData.getSQLQueryComposer().getSelectClause(true)); + sql.append(composer.getSelectClause(true)); sql.append(' '); sql.append(fromClause); - oQueryMetaData.getSQLQueryComposer().getQueryComposer().setElementaryQuery(sql.toString()); + composer.getQueryComposer().setElementaryQuery(sql.toString()); } - oQueryMetaData.getSQLQueryComposer().getQueryComposer().setStructuredFilter( new PropertyValue[][] {} ); + composer.getQueryComposer().setStructuredFilter( new PropertyValue[][] {} ); for (int i = 0; i < RowCount; i++) { - ControlRow CurControlRow = oControlRows[i]; - if (CurControlRow.isEnabled()) + ControlRow currentControlRow = oControlRows[i]; + if (currentControlRow.isEnabled()) { - if (CurControlRow.isConditionComplete()) + if (currentControlRow.isConditionComplete()) { - String sFieldName = CurControlRow.getSelectedFieldName(); - int nOperator = (int) CurControlRow.getSelectedOperator(); + String sFieldName = currentControlRow.getSelectedFieldName(); + int nOperator = (int) currentControlRow.getSelectedOperator(); FieldColumn aFieldColumn = oQueryMetaData.getFieldColumnByDisplayName(sFieldName); columnSet.setPropertyValue("Name", aFieldColumn.getFieldName()); columnSet.setPropertyValue("Type", aFieldColumn.getXColumnPropertySet().getPropertyValue("Type")); - Object value = CurControlRow.getValue(); + Object value = currentControlRow.getValue(); switch(aFieldColumn.getFieldType()) { case DataType.TIMESTAMP: @@ -278,14 +279,23 @@ public class FilterComponent break; } column.removeProperty( "Value" ); - column.addProperty("Value", (short)( PropertyAttribute.MAYBEVOID | PropertyAttribute.REMOVABLE ), value ); + final short operator = currentControlRow.getSelectedOperator(); + if ( ( operator == SQLFilterOperator.SQLNULL ) + || ( operator == SQLFilterOperator.NOT_SQLNULL ) + || AnyConverter.isVoid( value ) + ) + { + column.addProperty("Value", (short)( PropertyAttribute.MAYBEVOID | PropertyAttribute.REMOVABLE ), new String() ); + value = new Any( new Type( TypeClass.VOID ), null ); + } + else + column.addProperty("Value", (short)( PropertyAttribute.MAYBEVOID | PropertyAttribute.REMOVABLE ), value ); columnSet.setPropertyValue("Value", value); - oQueryMetaData.getSQLQueryComposer().getQueryComposer().appendFilterByColumn(columnSet, getfilterstate() == this.SOI_MATCHALL,nOperator); + composer.getQueryComposer().appendFilterByColumn(columnSet, getfilterstate() == this.SOI_MATCHALL,nOperator); } } } - final String test = oQueryMetaData.getSQLQueryComposer().getQueryComposer().getQuery(); - filterconditions = oQueryMetaData.getSQLQueryComposer().getQueryComposer().getStructuredFilter(); + filterconditions = composer.getNormalizedStructuredFilter(); int[] iduplicate = JavaTools.getDuplicateFieldIndex(filterconditions); if (iduplicate[0] != -1) { @@ -520,7 +530,6 @@ public class FilterComponent // ------------------------------------------------------------------------- final class ControlRow { - private final static int SOLSTFIELDNAME = 3; private final static int SOLSTOPERATOR = 4; private final static int SOTXTVALUE = 5; @@ -936,9 +945,9 @@ public class FilterComponent protected String getDateTimeString(boolean bgetDate) { - double dblValue = ((Double) getValue()).doubleValue(); - NumberFormatter oNumberFormatter = oQueryMetaData.getNumberFormatter(); - return oNumberFormatter.convertNumberToString(iDateTimeFormat, dblValue); + double dblValue = ((Double) getValue()).doubleValue(); + NumberFormatter oNumberFormatter = oQueryMetaData.getNumberFormatter(); + return oNumberFormatter.convertNumberToString(iDateTimeFormat, dblValue); } } } -- cgit From f4df9addbc32c9180c5c6fe80606c0bc6691ec5a Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Mon, 20 Sep 2010 15:59:26 +0200 Subject: impress201: #i111302# applied patch to leave more room for strings --- cui/source/options/optimprove.src | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cui/source/options/optimprove.src b/cui/source/options/optimprove.src index 003390d4600a..833cab27330e 100644 --- a/cui/source/options/optimprove.src +++ b/cui/source/options/optimprove.src @@ -84,23 +84,23 @@ TabPage RID_SVXPAGE_IMPROVEMENT FixedText FT_NR_REPORTS { Pos = MAP_APPFONT ( 12 , 132 ) ; - Size = MAP_APPFONT ( 80 , 8 ) ; + Size = MAP_APPFONT ( 96 , 8 ) ; Text [ en-US ] = "Number of reports sent:" ; }; FixedText FT_NR_REPORTS_VALUE { - Pos = MAP_APPFONT ( 95 , 132 ) ; + Pos = MAP_APPFONT ( 111 , 132 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; }; FixedText FT_NR_ACTIONS { Pos = MAP_APPFONT ( 12 , 145 ) ; - Size = MAP_APPFONT ( 80 , 8 ) ; + Size = MAP_APPFONT ( 96 , 8 ) ; Text [ en-US ] = "Number of tracked actions:" ; }; FixedText FT_NR_ACTIONS_VALUE { - Pos = MAP_APPFONT ( 95 , 145 ) ; + Pos = MAP_APPFONT ( 111 , 145 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; }; PushButton PB_SHOWDATA -- cgit From 3dc0a69ae5a399c0b82827ff863530fd7b8e13a2 Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Tue, 21 Sep 2010 11:36:27 +0200 Subject: dba33j: #i111302# fixed truncated strings --- cui/source/options/optimprove.src | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cui/source/options/optimprove.src b/cui/source/options/optimprove.src index 003390d4600a..232595b534e4 100644 --- a/cui/source/options/optimprove.src +++ b/cui/source/options/optimprove.src @@ -84,29 +84,29 @@ TabPage RID_SVXPAGE_IMPROVEMENT FixedText FT_NR_REPORTS { Pos = MAP_APPFONT ( 12 , 132 ) ; - Size = MAP_APPFONT ( 80 , 8 ) ; + Size = MAP_APPFONT ( 96 , 8 ) ; Text [ en-US ] = "Number of reports sent:" ; }; FixedText FT_NR_REPORTS_VALUE { - Pos = MAP_APPFONT ( 95 , 132 ) ; + Pos = MAP_APPFONT ( 111 , 132 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; }; FixedText FT_NR_ACTIONS { Pos = MAP_APPFONT ( 12 , 145 ) ; - Size = MAP_APPFONT ( 80 , 8 ) ; + Size = MAP_APPFONT ( 96 , 8 ) ; Text [ en-US ] = "Number of tracked actions:" ; }; FixedText FT_NR_ACTIONS_VALUE { Pos = MAP_APPFONT ( 95 , 145 ) ; - Size = MAP_APPFONT ( 100 , 10 ) ; + Size = MAP_APPFONT ( 111 , 10 ) ; }; PushButton PB_SHOWDATA { Pos = MAP_APPFONT ( 12 , 161 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; + Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~Show Data" ; }; String STR_INFO -- cgit From 872f35d9f662a76c8072126502430dabb99d800e Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Tue, 21 Sep 2010 12:31:14 +0200 Subject: impress201: #i112587# add display properties to control shapes --- cui/source/options/optimprove.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cui/source/options/optimprove.src b/cui/source/options/optimprove.src index 833cab27330e..c389b38cddfa 100644 --- a/cui/source/options/optimprove.src +++ b/cui/source/options/optimprove.src @@ -106,7 +106,7 @@ TabPage RID_SVXPAGE_IMPROVEMENT PushButton PB_SHOWDATA { Pos = MAP_APPFONT ( 12 , 161 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; + Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~Show Data" ; }; String STR_INFO -- cgit From 8a378d15f051141375ae2a38d5e94851b120207f Mon Sep 17 00:00:00 2001 From: sb Date: Wed, 22 Sep 2010 13:00:22 +0200 Subject: sb123: #i114669# disabled forms.OListBoxControl for now --- forms/qa/unoapi/forms.sce | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit From 0336bdb79be24d95dac3ab814c52a8738aeb5253 Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Thu, 23 Sep 2010 11:21:26 +0200 Subject: dba33j: #i111302# fixed truncated strings --- cui/source/options/optimprove.src | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cui/source/options/optimprove.src b/cui/source/options/optimprove.src index 232595b534e4..c389b38cddfa 100644 --- a/cui/source/options/optimprove.src +++ b/cui/source/options/optimprove.src @@ -100,8 +100,8 @@ TabPage RID_SVXPAGE_IMPROVEMENT }; FixedText FT_NR_ACTIONS_VALUE { - Pos = MAP_APPFONT ( 95 , 145 ) ; - Size = MAP_APPFONT ( 111 , 10 ) ; + Pos = MAP_APPFONT ( 111 , 145 ) ; + Size = MAP_APPFONT ( 100 , 10 ) ; }; PushButton PB_SHOWDATA { -- cgit From 7f245231f6129c8b9c2122771906312ae76a4de9 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Wed, 29 Sep 2010 10:23:10 +0200 Subject: cws dict33a: #i114774 thesaurus patch applied --- lingucomponent/source/spellcheck/spell/sspellimp.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx index 0cb6ad8ec3da..5fc0c517e141 100644 --- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx +++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx @@ -375,6 +375,9 @@ sal_Bool SAL_CALL return TRUE; #endif + // return FALSE to process SPELLML requests (they are longer than the header) + if (rWord.match(A2OU(SPELLML_HEADER), 0) && (rWord.getLength() > 10)) return FALSE; + // Get property values to be used. // These are be the default values set in the SN_LINGU_PROPERTIES // PropertySet which are overridden by the supplied ones from the -- cgit From c77edfc8242f44cfa57f6004f300eb7dc3a6a269 Mon Sep 17 00:00:00 2001 From: Ingo Schmidt Date: Wed, 13 Oct 2010 14:56:29 +0200 Subject: native338 #i115046# new jre6u22 --- setup_native/source/java/javaversion.dat | 26 +++++++++++++------------- setup_native/source/java/javaversion2.dat | 26 +++++++++++++------------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/setup_native/source/java/javaversion.dat b/setup_native/source/java/javaversion.dat index bb935ac2ce58..a647694a7619 100755 --- a/setup_native/source/java/javaversion.dat +++ b/setup_native/source/java/javaversion.dat @@ -26,30 +26,30 @@ #************************************************************************* # GUI String in the installer ("Java Runtime Environment (${JAVAVERSION})") -JAVAVERSION=Java 6 Update 21 -WINDOWSJAVAVERSION=Java 6 Update 21 +JAVAVERSION=Java 6 Update 22 +WINDOWSJAVAVERSION=Java 6 Update 22 # Windows (scp2 and downloadtemplate.nsi) -WINDOWSJAVAFILENAME=jre-6u21-windows-i586.exe -WINDOWSJAVAREGISTRYENTRY=1.6.0_21 +WINDOWSJAVAFILENAME=jre-6u22-windows-i586.exe +WINDOWSJAVAREGISTRYENTRY=1.6.0_22 # Linux (scp2) -LINUXJAVAFILENAME=jre-6u21-linux-i586.rpm +LINUXJAVAFILENAME=jre-6u22-linux-i586.rpm # Linux (rpmUnit.xml, rpm -qp ) -LINUXJAVANAME=jre-1.6.0_21-fcs +LINUXJAVANAME=jre-1.6.0_22-fcs # Linux-x64 (scp2) -LINUXX64JAVAFILENAME=jre-6u21-linux-amd64.rpm +LINUXX64JAVAFILENAME=jre-6u22-linux-amd64.rpm # Solaris Sparc (scp2) -SOLSJAVARTPACKED=SUNWj6rt_1_6_0_21_sparc.tar.gz -SOLSJAVACFGPACKED=SUNWj6cfg_1_6_0_21_sparc.tar.gz -SOLSJAVAMANPACKED=SUNWj6man_1_6_0_21_sparc.tar.gz +SOLSJAVARTPACKED=SUNWj6rt_1_6_0_22_sparc.tar.gz +SOLSJAVACFGPACKED=SUNWj6cfg_1_6_0_22_sparc.tar.gz +SOLSJAVAMANPACKED=SUNWj6man_1_6_0_22_sparc.tar.gz # Solaris x86 (scp2) -SOLIJAVARTPACKED=SUNWj6rt_1_6_0_21_x86.tar.gz -SOLIJAVACFGPACKED=SUNWj6cfg_1_6_0_21_x86.tar.gz -SOLIJAVAMANPACKED=SUNWj6man_1_6_0_21_x86.tar.gz +SOLIJAVARTPACKED=SUNWj6rt_1_6_0_22_x86.tar.gz +SOLIJAVACFGPACKED=SUNWj6cfg_1_6_0_22_x86.tar.gz +SOLIJAVAMANPACKED=SUNWj6man_1_6_0_22_x86.tar.gz # Solaris (pkgUnit.xml, needs only to be changed in major changes) SOLARISJAVART=SUNWj6rt diff --git a/setup_native/source/java/javaversion2.dat b/setup_native/source/java/javaversion2.dat index bb935ac2ce58..a647694a7619 100644 --- a/setup_native/source/java/javaversion2.dat +++ b/setup_native/source/java/javaversion2.dat @@ -26,30 +26,30 @@ #************************************************************************* # GUI String in the installer ("Java Runtime Environment (${JAVAVERSION})") -JAVAVERSION=Java 6 Update 21 -WINDOWSJAVAVERSION=Java 6 Update 21 +JAVAVERSION=Java 6 Update 22 +WINDOWSJAVAVERSION=Java 6 Update 22 # Windows (scp2 and downloadtemplate.nsi) -WINDOWSJAVAFILENAME=jre-6u21-windows-i586.exe -WINDOWSJAVAREGISTRYENTRY=1.6.0_21 +WINDOWSJAVAFILENAME=jre-6u22-windows-i586.exe +WINDOWSJAVAREGISTRYENTRY=1.6.0_22 # Linux (scp2) -LINUXJAVAFILENAME=jre-6u21-linux-i586.rpm +LINUXJAVAFILENAME=jre-6u22-linux-i586.rpm # Linux (rpmUnit.xml, rpm -qp ) -LINUXJAVANAME=jre-1.6.0_21-fcs +LINUXJAVANAME=jre-1.6.0_22-fcs # Linux-x64 (scp2) -LINUXX64JAVAFILENAME=jre-6u21-linux-amd64.rpm +LINUXX64JAVAFILENAME=jre-6u22-linux-amd64.rpm # Solaris Sparc (scp2) -SOLSJAVARTPACKED=SUNWj6rt_1_6_0_21_sparc.tar.gz -SOLSJAVACFGPACKED=SUNWj6cfg_1_6_0_21_sparc.tar.gz -SOLSJAVAMANPACKED=SUNWj6man_1_6_0_21_sparc.tar.gz +SOLSJAVARTPACKED=SUNWj6rt_1_6_0_22_sparc.tar.gz +SOLSJAVACFGPACKED=SUNWj6cfg_1_6_0_22_sparc.tar.gz +SOLSJAVAMANPACKED=SUNWj6man_1_6_0_22_sparc.tar.gz # Solaris x86 (scp2) -SOLIJAVARTPACKED=SUNWj6rt_1_6_0_21_x86.tar.gz -SOLIJAVACFGPACKED=SUNWj6cfg_1_6_0_21_x86.tar.gz -SOLIJAVAMANPACKED=SUNWj6man_1_6_0_21_x86.tar.gz +SOLIJAVARTPACKED=SUNWj6rt_1_6_0_22_x86.tar.gz +SOLIJAVACFGPACKED=SUNWj6cfg_1_6_0_22_x86.tar.gz +SOLIJAVAMANPACKED=SUNWj6man_1_6_0_22_x86.tar.gz # Solaris (pkgUnit.xml, needs only to be changed in major changes) SOLARISJAVART=SUNWj6rt -- cgit