summaryrefslogtreecommitdiff
path: root/offapi
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-05-24 22:44:30 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-05-25 11:47:50 +0200
commit1b6678993c905df231147d55e4fc9a9b15406812 (patch)
tree200dd3911abf9dc99713ac0ec52e50a6a3a22252 /offapi
parentf6d39d7e2c64a6aec8c83943caf827a57f067335 (diff)
Revert "fdo#46808, Convert awt::UnoControlDialogModel to new style"
This reverts commit 6c61b20a8d4a6dcac28801cde82a211fb7e30654. As discussed at <http://lists.freedesktop.org/archives/libreoffice/2013-May/052449.html> "Re: fdo#46808, Convert awt::UnoControlDialogModel to new style problem" why the odd change in 2e2a4827ce6708f0e8677dba9cc92e1479a44086 "scripting: get CreateUnoDialog() work again" appears to fix things again: The problem is that the implementation of the css.awt.UnoControlDialogModel involves UNO aggregation (IMPL_CREATE_INSTANCE_WITH_GEOMETRY(UnoControlDialogModel) in toolkit/soruce/helper/registerservices.cxx creating a OGeometryControlModel<UnoControlDialogModel> instance that aggregates a UnoControlDialogModel instance). That means that queryInterface can return a reference to something that is technically a different object, and that's what's happening here, and explains why calling setPropertyValue in two different ways on what logically appears to be a single object can end up calling two different implementations (of two different physical objects). (UNO aggregation is known to be broken and should not be used. Nevertheless, there's still code that does---code that is a horrible mess and hard to clean up.) That all this worked as intended in the past is just sheer luck, but any way of substantially touching it is asking for trouble. I'm going to revert 6c61b20a8d4a6dcac28801cde82a211fb7e30654 again. I wasn't able to revert without also reverting be50ad28f5bbdaeff527f646481ce263843c2401 "fdo#46808, Convert awt::XUnoControlDialog to new style," as the two were tightly dependant. Also reverts all the follow-up fixes cb4b6dde8fda2a5848e11063028bf44d72f85431 "-Werror,-Wuninitialized" (sans the const-ness fix in UpdateHandler::insertControlModel), 697a007c61b9cabceb9767fad87cd5822b300452 "Fix exception specifications," 2ce6828bbbf6ba181bb2276adeec279e74151ef6 "fix awt::UnoControlModelDialog crash," and 2e2a4827ce6708f0e8677dba9cc92e1479a44086 "scripting: get CreateUnoDialog() work again." Conflicts: basctl/source/dlged/dlged.cxx filter/source/t602/t602filter.cxx xmlscript/test/imexp.cxx Change-Id: I5d133468062f3ca36300db52fbd699be1ac72998 (cherry picked from commit e36f83d81c462e1a5959b160886e481a8d449494)
Diffstat (limited to 'offapi')
-rw-r--r--offapi/UnoApi_offapi.mk6
-rw-r--r--offapi/com/sun/star/awt/UnoControlDialog.idl20
-rw-r--r--offapi/com/sun/star/awt/UnoControlDialogModel.idl122
-rw-r--r--offapi/com/sun/star/awt/XUnoControlDialog.idl58
-rw-r--r--offapi/com/sun/star/awt/XUnoControlDialogModel.idl166
-rw-r--r--offapi/type_reference/offapi.rdbbin6831616 -> 6833152 bytes
6 files changed, 139 insertions, 233 deletions
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 7439a2e84a6c..db062c4e576a 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -60,8 +60,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/awt,\
PopupMenu \
TabController \
Toolkit \
- UnoControlDialog \
- UnoControlDialogModel \
UnoControlDialogModelProvider \
))
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/awt/grid,\
@@ -518,7 +516,9 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/awt,\
UnoControlCurrencyFieldModel \
UnoControlDateField \
UnoControlDateFieldModel \
+ UnoControlDialog \
UnoControlDialogElement \
+ UnoControlDialogModel \
UnoControlEdit \
UnoControlEditModel \
UnoControlFileControl \
@@ -1876,8 +1876,6 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,offapi/com/sun/star/awt,\
XTopWindowListener \
XUnitConversion \
XUnoControlContainer \
- XUnoControlDialog \
- XUnoControlDialogModel \
XUserInputInterception \
XVclContainer \
XVclContainerListener \
diff --git a/offapi/com/sun/star/awt/UnoControlDialog.idl b/offapi/com/sun/star/awt/UnoControlDialog.idl
index 67e0b79b8381..4cc079e4f082 100644
--- a/offapi/com/sun/star/awt/UnoControlDialog.idl
+++ b/offapi/com/sun/star/awt/UnoControlDialog.idl
@@ -19,14 +19,28 @@
#ifndef __com_sun_star_awt_UnoControlDialog_idl__
#define __com_sun_star_awt_UnoControlDialog_idl__
-#include <com/sun/star/awt/XUnoControlDialog.idl>
+#include <com/sun/star/awt/UnoControlContainer.idl>
-module com { module sun { module star { module awt {
+#include <com/sun/star/awt/XTopWindow.idl>
+
+#include <com/sun/star/awt/XDialog2.idl>
+
+
+
+ module com { module sun { module star { module awt {
/** specifies a dialog control.
*/
-published service UnoControlDialog : XUnoControlDialog;
+published service UnoControlDialog
+{
+ service com::sun::star::awt::UnoControlContainer;
+
+ interface com::sun::star::awt::XTopWindow;
+
+ interface com::sun::star::awt::XDialog2;
+
+};
}; }; }; };
diff --git a/offapi/com/sun/star/awt/UnoControlDialogModel.idl b/offapi/com/sun/star/awt/UnoControlDialogModel.idl
index 3956102d1508..9c4dd99a4642 100644
--- a/offapi/com/sun/star/awt/UnoControlDialogModel.idl
+++ b/offapi/com/sun/star/awt/UnoControlDialogModel.idl
@@ -19,7 +19,14 @@
#ifndef __com_sun_star_awt_UnoControlDialogModel_idl__
#define __com_sun_star_awt_UnoControlDialogModel_idl__
-#include <com/sun/star/awt/XUnoControlDialogModel.idl>
+#include <com/sun/star/awt/FontDescriptor.idl>
+#include <com/sun/star/awt/UnoControlModel.idl>
+#include <com/sun/star/container/XContainer.idl>
+#include <com/sun/star/container/XNameContainer.idl>
+
+#include <com/sun/star/lang/XMultiServiceFactory.idl>
+#include <com/sun/star/util/Color.idl>
+#include <com/sun/star/graphic/XGraphic.idl>
module com { module sun { module star { module awt {
@@ -27,7 +34,118 @@
/** specifies the standard model of an <type>UnoControlDialog</type>.
*/
-published service UnoControlDialogModel : XUnoControlDialogModel;
+published service UnoControlDialogModel
+{
+ service com::sun::star::awt::UnoControlModel;
+
+ /** allows to create control models, which support the
+ <type>UnoControlDialogElement</type> service and can be inserted into
+ this container.
+ */
+ interface com::sun::star::lang::XMultiServiceFactory;
+
+ interface com::sun::star::container::XContainer;
+
+ interface com::sun::star::container::XNameContainer;
+
+
+ /** specifies the background color (RGB) of the dialog.
+ */
+ [property] com::sun::star::util::Color BackgroundColor;
+
+
+ /** specifies if the dialog is closeable.
+ */
+ [property] boolean Closeable;
+
+
+ /** determines whether a dialog is enabled or disabled.
+ */
+ [property] boolean Enabled;
+
+
+ /** specifies the font attributes of the text in the caption bar of the dialog.
+ */
+ [property] com::sun::star::awt::FontDescriptor FontDescriptor;
+
+
+ /** specifies the <type scope="com::sun::star::text">FontEmphasis</type>
+ value of the text in the caption bar of the dialog.
+ */
+ [property] short FontEmphasisMark;
+
+
+ /** specifies the <type scope="com::sun::star::text">FontRelief</type>
+ value of the text in the caption bar of the dialog.
+ */
+ [property] short FontRelief;
+
+
+ /** specifies the help text of the dialog.
+ */
+ [property] string HelpText;
+
+
+ /** specifies the help URL of the dialog.
+ */
+ [property] string HelpURL;
+
+
+ /** specifies if the dialog is moveable.
+ */
+ [property] boolean Moveable;
+
+
+ /** specifies if the dialog is sizeable.
+ */
+ [property] boolean Sizeable;
+
+
+ /** specifies the text color (RGB) of the dialog.
+ */
+ [property] com::sun::star::util::Color TextColor;
+
+
+ /** specifies the text line color (RGB) of the dialog.
+ */
+ [property] com::sun::star::util::Color TextLineColor;
+
+
+ /** specifies the text that is displayed in the caption bar of the dialog.
+ */
+ [property] string Title;
+
+
+ /** If set to true the dialog will have the desktop as parent.
+
+ @since OOo 2.3
+ */
+ [optional, property] boolean DesktopAsParent;
+
+ /** specifies a URL that references a graphic that should be used as a
+ background image.
+ @see Graphic
+
+ @since OOo 2.4
+ */
+ [optional, property] string ImageURL;
+
+ /** specifies a graphic to be displayed as a background image
+
+ <p>If this property is present, it interacts with the <member>ImageURL</member>in the
+ following way:
+ <ul><li>If <member>ImageURL</member> is set, <member>Graphic</member> will be reset
+ to an object as loaded from the given image URL, or <NULL/> if <member>ImageURL</member>
+ does not point to a valid image file.</li>
+ <li>If <member>Graphic</member> is set, <member>ImageURL</member> will be reset
+ to an empty string.</li>
+ </ul></p>
+
+ @since OOo 2.4
+ */
+ [optional, property, transient] com::sun::star::graphic::XGraphic Graphic;
+
+};
}; }; }; };
diff --git a/offapi/com/sun/star/awt/XUnoControlDialog.idl b/offapi/com/sun/star/awt/XUnoControlDialog.idl
deleted file mode 100644
index 3d513b71adc3..000000000000
--- a/offapi/com/sun/star/awt/XUnoControlDialog.idl
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef __com_sun_star_awt_XUnoControlDialog_idl__
-#define __com_sun_star_awt_XUnoControlDialog_idl__
-
-#include <com/sun/star/container/XNameContainer.idl>
-#include <com/sun/star/awt/XControl.idl>
-#include <com/sun/star/awt/XDialog2.idl>
-#include <com/sun/star/awt/XTopWindow.idl>
-#include <com/sun/star/awt/XControlContainer.idl>
-#include <com/sun/star/awt/XWindow.idl>
-
-
-module com { module sun { module star { module awt {
-
-/**
- The interface for the UnoControlDialog service.
- This service actually implements a whole whack of interfaces. This is the just
- the subset that our code needs.
-
- @since LibreOffice 4.1
- */
-published interface XUnoControlDialog
-{
-
- interface com::sun::star::awt::XControlContainer; // -> XInterface
-
- interface com::sun::star::awt::XControl; // -> XComponent
-
- interface com::sun::star::awt::XWindow; // -> XComponent
-
- interface com::sun::star::awt::XTopWindow; // -> XInterface
-
- interface com::sun::star::awt::XDialog2; // -> XDialog -> XInterface
-};
-
-
-}; }; }; };
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/awt/XUnoControlDialogModel.idl b/offapi/com/sun/star/awt/XUnoControlDialogModel.idl
deleted file mode 100644
index 9032a37b582d..000000000000
--- a/offapi/com/sun/star/awt/XUnoControlDialogModel.idl
+++ /dev/null
@@ -1,166 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef __com_sun_star_awt_XUnoControlDialogModel_idl__
-#define __com_sun_star_awt_XUnoControlDialogModel_idl__
-
-#include <com/sun/star/awt/FontDescriptor.idl>
-#include <com/sun/star/awt/XControlModel.idl>
-#include <com/sun/star/beans/XPropertySet.idl>
-#include <com/sun/star/container/XContainer.idl>
-#include <com/sun/star/container/XNameContainer.idl>
-
-#include <com/sun/star/lang/XMultiServiceFactory.idl>
-#include <com/sun/star/util/Color.idl>
-#include <com/sun/star/graphic/XGraphic.idl>
-
-
-module com { module sun { module star { module awt {
-
-
-/**
- Unified interface for the UnoControlDialogModel service.
-
- @since LibreOffice 4.1
- */
-published interface XUnoControlDialogModel
-{
- interface com::sun::star::awt::XControlModel;
-
- /** allows to create control models, which support the
- <type>UnoControlDialogElement</type> service and can be inserted into
- this container.
- */
- interface com::sun::star::lang::XMultiServiceFactory;
-
- interface com::sun::star::beans::XPropertySet;
-
- interface com::sun::star::container::XNameContainer; // -> XNameReplace -> XNameAccess -> XElementAccess
-
- [attribute] string Name;
-
- [attribute] boolean Decoration;
-
- [attribute] long PositionX;
-
- [attribute] long PositionY;
-
- [attribute] long Width;
-
- [attribute] long Height;
-
- [attribute] string DialogSourceURL;
-
- /** specifies the text that is displayed in the caption bar of the dialog.
- */
- [attribute] string Title;
-
- /** specifies if the dialog is closeable.
- */
- [attribute] boolean Closeable;
-
- /** determines whether a dialog is enabled or disabled.
- */
- [attribute] boolean Enabled;
-
- /** specifies if the dialog is moveable.
- */
- [attribute] boolean Moveable;
-
- /** specifies if the dialog is sizeable.
- */
- [attribute] boolean Sizeable;
-
- /** If set to true the dialog will have the desktop as parent.
-
- @since OOo 2.3
- */
- [attribute] boolean DesktopAsParent;
-
- /** specifies the help URL of the dialog.
- */
- [attribute] string HelpURL;
-
-
- /** specifies the background color (RGB) of the dialog.
- */
- [attribute] com::sun::star::util::Color BackgroundColor;
-
-
- /** specifies the font attributes of the text in the caption bar of the dialog.
- */
- [attribute] com::sun::star::awt::FontDescriptor FontDescriptor;
-
-
- /** specifies the <type scope="com::sun::star::text">FontEmphasis</type>
- value of the text in the caption bar of the dialog.
- */
- [attribute] short FontEmphasisMark;
-
-
- /** specifies the <type scope="com::sun::star::text">FontRelief</type>
- value of the text in the caption bar of the dialog.
- */
- [attribute] short FontRelief;
-
-
- /** specifies the help text of the dialog.
- */
- [attribute] string HelpText;
-
-
- /** specifies the text color (RGB) of the dialog.
- */
- [attribute] com::sun::star::util::Color TextColor;
-
-
- /** specifies the text line color (RGB) of the dialog.
- */
- [attribute] com::sun::star::util::Color TextLineColor;
-
- /** specifies a URL that references a graphic that should be used as a
- background image.
- @see Graphic
-
- @since OOo 2.4
- */
- [attribute] string ImageURL;
-
- /** specifies a graphic to be displayed as a background image
-
- <p>If this property is present, it interacts with the <member>ImageURL</member>in the
- following way:
- <ul><li>If <member>ImageURL</member> is set, <member>Graphic</member> will be reset
- to an object as loaded from the given image URL, or <NULL/> if <member>ImageURL</member>
- does not point to a valid image file.</li>
- <li>If <member>Graphic</member> is set, <member>ImageURL</member> will be reset
- to an empty string.</li>
- </ul></p>
-
- @since OOo 2.4
- */
- [attribute] com::sun::star::graphic::XGraphic Graphic;
-
-};
-
-
-}; }; }; };
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/type_reference/offapi.rdb b/offapi/type_reference/offapi.rdb
index c117713b5b11..0d73ab1bc233 100644
--- a/offapi/type_reference/offapi.rdb
+++ b/offapi/type_reference/offapi.rdb
Binary files differ