[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - 2 commits - include/toolkit offapi/com scripting/source toolkit/source
Miklos Vajna
vmiklos at suse.cz
Fri May 24 05:42:42 PDT 2013
include/toolkit/controls/dialogcontrol.hxx | 3 ---
offapi/com/sun/star/awt/XUnoControlDialogModel.idl | 3 ---
offapi/com/sun/star/resource/XStringResourceManager.idl | 2 +-
offapi/com/sun/star/resource/XStringResourceResolver.idl | 2 +-
scripting/source/dlgprov/dlgprov.cxx | 7 ++++++-
toolkit/source/controls/dialogcontrol.cxx | 8 --------
6 files changed, 8 insertions(+), 17 deletions(-)
New commits:
commit f983c6f9eeded013a62e9ffbbf98fe68755a1361
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Fri May 24 12:52:25 2013 +0200
scripting: get CreateUnoDialog() work again
Trivial reproducer:
Dim Dlg As Object
DialogLibraries.LoadLibrary("Standard")
Dlg = CreateUnoDialog(DialogLibraries.Standard.Dialog1)
Dlg.Execute()
Dlg.dispose()
Regression from 6c61b20a8d4a6dcac28801cde82a211fb7e30654.
Change-Id: Ia62778c6d94f54e6097a307701e5c81be847665d
Reviewed-on: https://gerrit.libreoffice.org/4023
Reviewed-by: Miklos Vajna <vmiklos at suse.cz>
Tested-by: Miklos Vajna <vmiklos at suse.cz>
(cherry picked from commit 2e2a4827ce6708f0e8677dba9cc92e1479a44086)
diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx
index 3584394..21ec3ef 100644
--- a/scripting/source/dlgprov/dlgprov.cxx
+++ b/scripting/source/dlgprov/dlgprov.cxx
@@ -149,9 +149,10 @@ static OUString aResourceResolverPropName("ResourceResolver");
// Set resource property
if( xStringResourceManager.is() )
{
+ Reference< beans::XPropertySet > xDlgPSet( xDialogModel, UNO_QUERY );
Any aStringResourceManagerAny;
aStringResourceManagerAny <<= xStringResourceManager;
- xDialogModel->setPropertyValue( aResourceResolverPropName, aStringResourceManagerAny );
+ xDlgPSet->setPropertyValue( aResourceResolverPropName, aStringResourceManagerAny );
}
return xDialogModel;
commit 5e0e21f083b034d78d1d24377ce4e7bd2d6b1ef3
Author: Noel Grandin <noel at peralex.com>
Date: Thu May 23 16:38:15 2013 +0200
fix awt::UnoControlModelDialog crash
...in commit 6c61b20a8d4a6dcac28801cde82a211fb7e30654,
"Convert awt::UnoControlDialogModel to new style"
I added an attribute "ResourceResolver" because some of the client
code was setting it using the property interface.
It turns out that this was a bad idea because the "ResourceResolver"
property is doing some very interesting stuff, so revert that part
of the change.
Change-Id: I62b890e60164e005867ced49c3e407a49ed09441
Reviewed-on: https://gerrit.libreoffice.org/4013
Reviewed-by: Miklos Vajna <vmiklos at suse.cz>
Tested-by: Miklos Vajna <vmiklos at suse.cz>
(cherry picked from commit 2ce6828bbbf6ba181bb2276adeec279e74151ef6)
diff --git a/include/toolkit/controls/dialogcontrol.hxx b/include/toolkit/controls/dialogcontrol.hxx
index f92652a..a749c24 100644
--- a/include/toolkit/controls/dialogcontrol.hxx
+++ b/include/toolkit/controls/dialogcontrol.hxx
@@ -166,9 +166,6 @@ public:
{ return getPropertyString("ImageURL"); }
virtual void SAL_CALL setImageURL(const rtl::OUString& p1) throw(::com::sun::star::uno::RuntimeException)
{ setPropertyString("ImageURL", p1); }
- virtual com::sun::star::uno::Reference<com::sun::star::resource::XStringResourceManager> SAL_CALL getResourceResolver() throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setResourceResolver(const com::sun::star::uno::Reference<com::sun::star::resource::XStringResourceManager>& p1) throw(::com::sun::star::uno::RuntimeException)
- { setPropertyValue( "ResourceResolver", css::uno::Any(p1) ); }
virtual com::sun::star::awt::FontDescriptor SAL_CALL getFontDescriptor() throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setFontDescriptor(const com::sun::star::awt::FontDescriptor& p1) throw(::com::sun::star::uno::RuntimeException)
{ setPropertyValue( "FontDescriptor", css::uno::Any(p1) ); }
diff --git a/offapi/com/sun/star/awt/XUnoControlDialogModel.idl b/offapi/com/sun/star/awt/XUnoControlDialogModel.idl
index 81cd2b1..9032a37 100644
--- a/offapi/com/sun/star/awt/XUnoControlDialogModel.idl
+++ b/offapi/com/sun/star/awt/XUnoControlDialogModel.idl
@@ -28,7 +28,6 @@
#include <com/sun/star/lang/XMultiServiceFactory.idl>
#include <com/sun/star/util/Color.idl>
#include <com/sun/star/graphic/XGraphic.idl>
-#include <com/sun/star/resource/XStringResourceManager.idl>
module com { module sun { module star { module awt {
@@ -67,8 +66,6 @@ published interface XUnoControlDialogModel
[attribute] string DialogSourceURL;
- [attribute] com::sun::star::resource::XStringResourceManager ResourceResolver;
-
/** specifies the text that is displayed in the caption bar of the dialog.
*/
[attribute] string Title;
diff --git a/offapi/com/sun/star/resource/XStringResourceManager.idl b/offapi/com/sun/star/resource/XStringResourceManager.idl
index 423bedf..ad9a8f3 100644
--- a/offapi/com/sun/star/resource/XStringResourceManager.idl
+++ b/offapi/com/sun/star/resource/XStringResourceManager.idl
@@ -44,7 +44,7 @@ module com { module sun { module star { module resource {
localized dialogs.
*/
-published interface XStringResourceManager: com::sun::star::resource::XStringResourceResolver
+interface XStringResourceManager: com::sun::star::resource::XStringResourceResolver
{
/**
Returns the resource's read only state
diff --git a/offapi/com/sun/star/resource/XStringResourceResolver.idl b/offapi/com/sun/star/resource/XStringResourceResolver.idl
index 49bd841..d236f0d 100644
--- a/offapi/com/sun/star/resource/XStringResourceResolver.idl
+++ b/offapi/com/sun/star/resource/XStringResourceResolver.idl
@@ -42,7 +42,7 @@ module com { module sun { module star { module resource {
But also changing the locale at runtime can be supported in this way.
*/
-published interface XStringResourceResolver: com::sun::star::util::XModifyBroadcaster
+interface XStringResourceResolver: com::sun::star::util::XModifyBroadcaster
{
/**
Resolves the passed ResoureID for the current locale. This
diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx
index 98ae353..3584394 100644
--- a/scripting/source/dlgprov/dlgprov.cxx
+++ b/scripting/source/dlgprov/dlgprov.cxx
@@ -88,6 +88,8 @@ namespace dlgprov
{
//.........................................................................
+static OUString aResourceResolverPropName("ResourceResolver");
+
Reference< resource::XStringResourceManager > lcl_getStringResourceManager(const Reference< XComponentContext >& i_xContext,const OUString& i_sURL)
{
INetURLObject aInetObj( i_sURL );
@@ -147,7 +149,9 @@ namespace dlgprov
// Set resource property
if( xStringResourceManager.is() )
{
- xDialogModel->setResourceResolver( xStringResourceManager );
+ Any aStringResourceManagerAny;
+ aStringResourceManagerAny <<= xStringResourceManager;
+ xDialogModel->setPropertyValue( aResourceResolverPropName, aStringResourceManagerAny );
}
return xDialogModel;
diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx
index bd3ce4c..6042203 100644
--- a/toolkit/source/controls/dialogcontrol.cxx
+++ b/toolkit/source/controls/dialogcontrol.cxx
@@ -307,14 +307,6 @@ sal_Int32 UnoControlDialogModel::getPropertyInt32(const OUString& aPropertyName)
return b;
}
-Reference<css::resource::XStringResourceManager> UnoControlDialogModel::getResourceResolver() throw(css::uno::RuntimeException)
-{
- uno::Any any = getPropertyValue("ResourceResolver");
- Reference<css::resource::XStringResourceManager> b;
- any >>= b;
- return b;
-}
-
css::awt::FontDescriptor UnoControlDialogModel::getFontDescriptor() throw(css::uno::RuntimeException)
{
uno::Any any = getPropertyValue("FontDescriptor");
More information about the Libreoffice-commits
mailing list