summaryrefslogtreecommitdiff
path: root/toolkit/source
diff options
context:
space:
mode:
authorNoel Power <noel.power@novell.com>2010-11-05 11:32:11 +0000
committerNoel Power <noel.power@novell.com>2010-11-05 11:32:11 +0000
commit7dbb86011a23e4315acf06f2499b41af9a9cab64 (patch)
tree8211d942fd0f8fd9e75e7ad51a016a788df1de54 /toolkit/source
parent3ba9edf4164eb231a3f4208c0b234456a2e34e58 (diff)
fixup embedded graphic url handling
Diffstat (limited to 'toolkit/source')
-rw-r--r--toolkit/source/controls/dialogcontrol.cxx21
1 files changed, 12 insertions, 9 deletions
diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx
index f1d720b91db1..981332e1ecd2 100644
--- a/toolkit/source/controls/dialogcontrol.cxx
+++ b/toolkit/source/controls/dialogcontrol.cxx
@@ -1873,13 +1873,13 @@ void UnoDialogControl::PrepareWindowDescriptor( ::com::sun::star::awt::WindowDes
if (( ImplGetPropertyValue( PROPERTY_IMAGEURL ) >>= aImageURL ) &&
( aImageURL.getLength() > 0 ))
{
- aImageURL =
- getPhysicalLocation( ImplGetPropertyValue( PROPERTY_DIALOGSOURCEURL ),
+ rtl::OUString absoluteUrl( aImageURL );
+ if ( aImageURL.compareToAscii( UNO_NAME_GRAPHOBJ_URLPREFIX, RTL_CONSTASCII_LENGTH( UNO_NAME_GRAPHOBJ_URLPREFIX ) ) != 0 )
+ absoluteUrl =
+ getPhysicalLocation( ImplGetPropertyValue( PROPERTY_DIALOGSOURCEURL ),
ImplGetPropertyValue( PROPERTY_IMAGEURL ));
-
+ ImplSetPropertyValue( PROPERTY_IMAGEURL, uno::makeAny( absoluteUrl ), sal_True );
}
- if ( aImageURL.compareToAscii( UNO_NAME_GRAPHOBJ_URLPREFIX, RTL_CONSTASCII_LENGTH( UNO_NAME_GRAPHOBJ_URLPREFIX ) ) != 0 )
- ImplSetPropertyValue( PROPERTY_IMAGEURL, uno::makeAny( aImageURL ), sal_True );
}
void UnoDialogControl::elementInserted( const ContainerEvent& Event ) throw(RuntimeException)
@@ -2111,16 +2111,19 @@ void UnoDialogControl::ImplModelPropertiesChanged( const Sequence< PropertyChang
if ( bOwnModel && rEvt.PropertyName.equalsAsciiL( "ImageURL", 8 ))
{
::rtl::OUString aImageURL;
+ ::rtl::OUString absoluteUrl( aImageURL );
+ // Ignore GraphicObject urls
if (( ImplGetPropertyValue( PROPERTY_IMAGEURL ) >>= aImageURL ) &&
( aImageURL.getLength() > 0 ))
{
- aImageURL =
- getPhysicalLocation( ImplGetPropertyValue( PROPERTY_DIALOGSOURCEURL ),
+ absoluteUrl = aImageURL;
+ if ( aImageURL.compareToAscii( UNO_NAME_GRAPHOBJ_URLPREFIX, RTL_CONSTASCII_LENGTH( UNO_NAME_GRAPHOBJ_URLPREFIX ) ) != 0 )
+ absoluteUrl =
+ getPhysicalLocation( ImplGetPropertyValue( PROPERTY_DIALOGSOURCEURL ),
ImplGetPropertyValue( PROPERTY_IMAGEURL ));
+ ImplSetPropertyValue( PROPERTY_IMAGEURL, uno::makeAny( absoluteUrl ), sal_True );
}
-
- ImplSetPropertyValue( PROPERTY_IMAGEURL, uno::makeAny( aImageURL ), sal_True );
break;
}
}