fix awt::UnoControlModelDialog crash
...in commit 6c61b20a8d
,
"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@suse.cz>
Tested-by: Miklos Vajna <vmiklos@suse.cz>
This commit is contained in:
committed by
Miklos Vajna
parent
9413f2124d
commit
2ce6828bbb
@@ -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) ); }
|
||||
|
@@ -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;
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
@@ -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");
|
||||
|
Reference in New Issue
Block a user