summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorRelease Engineers <releng@openoffice.org>2008-12-01 12:31:27 +0000
committerRelease Engineers <releng@openoffice.org>2008-12-01 12:31:27 +0000
commitf0a7951ee7a9bb75519cefa5e226d186633e3e95 (patch)
treee60b8bbac6a8c4b3b0282f5cda72baf0d0ebc6ce /extensions
parent97a48f7a4812bc224729a88dbc8272d940bcb339 (diff)
CWS-TOOLING: integrate CWS dba31e
2008-11-19 12:36:23 +0100 msc r263980 : i96104 2008-11-19 12:31:19 +0100 msc r263979 : i96104 2008-11-19 12:21:55 +0100 msc r263977 : i96104 2008-11-19 12:18:53 +0100 msc r263976 : i96104 2008-11-18 09:09:45 +0100 oj r263746 : disable color entry when area is set 2008-11-18 08:37:52 +0100 oj r263741 : #remove sub report entry 2008-11-17 11:20:25 +0100 fs r263708 : #i10000# 2008-11-17 11:06:52 +0100 fs r263706 : minimal version now is 3.1 2008-11-12 22:25:59 +0100 fs r263621 : #i96150# 2008-11-12 22:20:02 +0100 fs r263620 : rebased to m34 2008-11-12 21:39:41 +0100 fs r263618 : MANUAL REBASE: rebase CWS dba31d to DEV300_m34 2008-11-12 13:54:58 +0100 fs r263597 : #i96134# MediaDescriptor.URL is to be preferred over MediaDescriptor.FileName. Nonetheless, ensure both are handled 2008-11-12 13:53:40 +0100 fs r263596 : #i96134# re-enabled the code for #i41897#, a better fix is to come 2008-11-12 12:48:21 +0100 fs r263585 : #i96134# disable saving URLs of file-base databases relatively 2008-11-11 16:11:11 +0100 msc r263566 : #i96104# 2008-11-05 09:09:47 +0100 oj r263342 : #i88727# color noe added 2008-11-05 08:41:43 +0100 oj r263341 : #i77916# zoom added 2008-11-04 21:24:15 +0100 fs r263339 : disposing: call disposeAndClear without own mutex locked - some of our listeners insist on locking the SolarMutex, which sometimes led to deadlocks on the complex test cases 2008-11-04 21:23:15 +0100 fs r263338 : remove SolarMutex locking - this happned in CWS dba31c (in the CVS version), which this CWS was created from, but seems to got lost during resync 2008-11-04 20:49:50 +0100 fs r263335 : docu formatting 2008-11-04 20:06:39 +0100 fs r263334 : #i95826# use m_aMutex, not a DocumentGuard (wrongly resolved merge conflicts) 2008-11-04 17:36:29 +0100 fs r263332 : #i92688# properly revoke as XEventListener from m_xActiveController when disposing 2008-11-04 14:49:34 +0100 fs r263324 : #i92322# enable Input Required if EmptyIsNULL does not exist at the control 2008-10-31 11:10:04 +0100 oj r262857 : merge from cvs to svn 2008-10-31 09:46:45 +0100 oj r262853 : merge from cvs to svn 2008-10-31 08:46:37 +0100 oj r262849 : merge from cvs to svn 2008-10-31 08:44:24 +0100 oj r262848 : merge from cvs to svn 2008-10-31 08:43:33 +0100 oj r262847 : merge from cvs to svn 2008-10-31 08:42:28 +0100 oj r262846 : merge from cvs to svn 2008-10-31 08:41:58 +0100 oj r262845 : merge from cvs to svn 2008-10-31 08:41:32 +0100 oj r262844 : merge from cvs to svn 2008-10-28 12:19:50 +0100 oj r262733 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:42 +0100 oj r262732 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:36 +0100 oj r262731 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:31 +0100 oj r262730 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:22 +0100 oj r262729 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:18 +0100 oj r262728 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:10 +0100 oj r262727 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:06 +0100 oj r262726 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:05 +0100 oj r262725 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:01 +0100 oj r262724 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:50 +0100 oj r262723 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:41 +0100 oj r262722 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:40 +0100 oj r262721 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:27 +0100 oj r262720 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:10 +0100 oj r262719 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:01 +0100 oj r262718 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:17:39 +0100 oj r262717 : #iXXXXX#: migrate CWS dba31e to SVN
Diffstat (limited to 'extensions')
-rw-r--r--extensions/inc/extensio.hrc5
-rw-r--r--extensions/source/abpilot/abpfinalpage.cxx4
-rw-r--r--extensions/source/propctrlr/formcomponenthandler.cxx107
-rw-r--r--extensions/source/propctrlr/formmetadata.cxx8
-rw-r--r--extensions/source/propctrlr/formmetadata.hxx31
-rw-r--r--extensions/source/propctrlr/formres.src20
-rw-r--r--extensions/source/propctrlr/formresid.hrc3
-rw-r--r--extensions/source/propctrlr/formstrings.hxx2
-rw-r--r--extensions/source/propctrlr/makefile.mk2
-rw-r--r--extensions/source/propctrlr/propcontroller.cxx19
-rw-r--r--extensions/source/propctrlr/propres.src4
-rw-r--r--extensions/source/propctrlr/propresid.hrc1
-rw-r--r--extensions/source/propctrlr/usercontrol.cxx15
-rw-r--r--extensions/util/hidother.src1
14 files changed, 179 insertions, 43 deletions
diff --git a/extensions/inc/extensio.hrc b/extensions/inc/extensio.hrc
index 1e9c94b29929..96b8a6b08a5b 100644
--- a/extensions/inc/extensio.hrc
+++ b/extensions/inc/extensio.hrc
@@ -157,7 +157,7 @@
//-----------------------------------------------------------------------
// FREE
- // FREE
+#define HID_PROP_INPUT_REQUIRED (HID_FORMS_START + 1)
#define HID_PROP_GROUPBOX (HID_FORMS_START + 2)
#define HID_PROP_CONTROLSOURCE (HID_FORMS_START + 3)
#define HID_PROP_NAME (HID_FORMS_START + 4)
@@ -181,7 +181,8 @@
#define HID_PROP_LOCKED (HID_FORMS_START + 22)
#define HID_PROP_FORMATKEY (HID_FORMS_START + 23)
#define HID_PROP_REQUIRED (HID_FORMS_START + 24)
-#define HID_PROP_SCALE (HID_FORMS_START + 25)
+ // FREE
+ // FREE
#define HID_PROP_UNIQUE (HID_FORMS_START + 27)
#define HID_PROP_CLASSID (HID_FORMS_START + 28)
#define HID_PROP_LEFT (HID_FORMS_START + 29)
diff --git a/extensions/source/abpilot/abpfinalpage.cxx b/extensions/source/abpilot/abpfinalpage.cxx
index 19f6c5e262f7..ac6c01693c2d 100644
--- a/extensions/source/abpilot/abpfinalpage.cxx
+++ b/extensions/source/abpilot/abpfinalpage.cxx
@@ -149,7 +149,9 @@ namespace abp
if (!AddressBookSourcePage::commitPage(_eReason))
return sal_False;
- if ( !m_aLocationController.prepareCommit() )
+ if ( ( eTravelBackward != _eReason )
+ && ( !m_aLocationController.prepareCommit() )
+ )
return sal_False;
AddressSettings& rSettings = getSettings();
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index f634c7bfa05c..d67d27ca34cd 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -80,6 +80,7 @@
#include <com/sun/star/inspection/PropertyLineElement.hpp>
#include <com/sun/star/resource/XStringResourceManager.hpp>
#include <com/sun/star/resource/MissingResourceException.hpp>
+#include <com/sun/star/graphic/GraphicObject.hpp>
/** === end UNO includes === **/
#include <connectivity/dbexception.hxx>
#include <vcl/wrkwin.hxx>
@@ -116,6 +117,7 @@
#include <limits>
+#define GRAPHOBJ_URLPREFIX "vnd.sun.star.GraphicObject:"
//------------------------------------------------------------------------
extern "C" void SAL_CALL createRegistryInfo_FormComponentPropertyHandler()
{
@@ -320,7 +322,8 @@ namespace pcr
Any SAL_CALL FormComponentPropertyHandler::getPropertyValue( const ::rtl::OUString& _rPropertyName ) throw (UnknownPropertyException, RuntimeException)
{
if( _rPropertyName == PROPERTY_ROWSET )
- return ::comphelper::OPropertyContainer::getPropertyValue( _rPropertyName);
+ return ::comphelper::OPropertyContainer::getPropertyValue( _rPropertyName );
+
::osl::MutexGuard aGuard( m_aMutex );
return impl_getPropertyValue_throw( _rPropertyName );
}
@@ -333,10 +336,19 @@ namespace pcr
::comphelper::OPropertyContainer::setPropertyValue( _rPropertyName, _rValue );
return;
}
+
::osl::MutexGuard aGuard( m_aMutex );
PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) ); // check if property is known by the handler
- if ( PROPERTY_ID_FONT_NAME == nPropId )
+ Reference< graphic::XGraphicObject > xGrfObj;
+ if ( PROPERTY_ID_IMAGE_URL == nPropId && ( _rValue >>= xGrfObj ) )
+ {
+ DBG_ASSERT( xGrfObj.is(), "FormComponentPropertyHandler::setPropertyValue() xGrfObj is invalid");
+ rtl::OUString sObjectID( RTL_CONSTASCII_USTRINGPARAM( GRAPHOBJ_URLPREFIX ) );
+ sObjectID = sObjectID + xGrfObj->getUniqueID();
+ m_xComponent->setPropertyValue( _rPropertyName, uno::makeAny( sObjectID ) );
+ }
+ else if ( PROPERTY_ID_FONT_NAME == nPropId )
{
// special handling, the value is a faked value we generated ourself in impl_executeFontDialog_nothrow
Sequence< NamedValue > aFontPropertyValues;
@@ -561,9 +573,14 @@ namespace pcr
{
::rtl::OUString sControlValue;
OSL_VERIFY( _rControlValue >>= sControlValue );
-
- INetURLObject aDocURL( impl_getDocumentURL_nothrow() );
- aPropertyValue <<= (::rtl::OUString)URIHelper::SmartRel2Abs( aDocURL, sControlValue, Link(), false, true, INetURLObject::WAS_ENCODED, INetURLObject::DECODE_TO_IURI );
+ // Don't convert a placeholder
+ if ( nPropId == PROPERTY_ID_IMAGE_URL && sControlValue.equals( String( PcrRes( RID_EMBED_IMAGE_PLACEHOLDER ) ) ) )
+ aPropertyValue <<= sControlValue;
+ else
+ {
+ INetURLObject aDocURL( impl_getDocumentURL_nothrow() );
+ aPropertyValue <<= (::rtl::OUString)URIHelper::SmartRel2Abs( aDocURL, sControlValue, Link(), false, true, INetURLObject::WAS_ENCODED, INetURLObject::DECODE_TO_IURI );
+ }
}
break;
@@ -816,7 +833,6 @@ namespace pcr
if ( SvtModuleOptions().IsModuleInstalled( SvtModuleOptions::E_SDATABASE ) )
const_cast< FormComponentPropertyHandler* >( this )->m_bHaveCommand = true;
break;
-
} // switch ( nPropId )
aProperties.push_back( *pProperty );
@@ -858,6 +874,7 @@ namespace pcr
aInterestingProperties.push_back( PROPERTY_DECIMAL_ACCURACY );
aInterestingProperties.push_back( PROPERTY_SHOWTHOUSANDSEP );
aInterestingProperties.push_back( PROPERTY_FORMATKEY );
+ aInterestingProperties.push_back( PROPERTY_EMPTY_IS_NULL );
return Sequence< ::rtl::OUString >( &(*aInterestingProperties.begin()), aInterestingProperties.size() );
}
@@ -1505,9 +1522,15 @@ namespace pcr
aDependentProperties.push_back( PROPERTY_ID_BOUNDCOLUMN );
aDependentProperties.push_back( PROPERTY_ID_SCALEIMAGE );
+ aDependentProperties.push_back( PROPERTY_ID_SCALE_MODE );
+ aDependentProperties.push_back( PROPERTY_ID_INPUT_REQUIRED );
}
break;
+ case PROPERTY_ID_EMPTY_IS_NULL:
+ aDependentProperties.push_back( PROPERTY_ID_INPUT_REQUIRED );
+ break;
+
// ----- SubmitEncoding -----
case PROPERTY_ID_SUBMIT_ENCODING:
{
@@ -1569,6 +1592,7 @@ namespace pcr
}
aDependentProperties.push_back( PROPERTY_ID_SCALEIMAGE );
+ aDependentProperties.push_back( PROPERTY_ID_SCALE_MODE );
}
break;
@@ -1739,8 +1763,9 @@ namespace pcr
}
break; // case PROPERTY_ID_BOUNDCOLUMN
- // ----- ScaleImage -----
+ // ----- ScaleImage, ScaleMode -----
case PROPERTY_ID_SCALEIMAGE:
+ case PROPERTY_ID_SCALE_MODE:
{
::rtl::OUString sControlSource;
if ( impl_isSupportedProperty_nothrow( PROPERTY_ID_CONTROLSOURCE ) )
@@ -1749,15 +1774,36 @@ namespace pcr
::rtl::OUString sImageURL;
impl_getPropertyValue_throw( PROPERTY_IMAGE_URL ) >>= sImageURL;
- _rxInspectorUI->enablePropertyUI( PROPERTY_SCALEIMAGE,
+ _rxInspectorUI->enablePropertyUI( impl_getPropertyNameFromId_nothrow( _nPropId ),
( sControlSource.getLength() != 0 ) || ( sImageURL.getLength() != 0 )
);
}
- break; // case PROPERTY_ID_SCALEIMAGE
+ break; // case PROPERTY_ID_SCALEIMAGE, PROPERTY_ID_SCALE_MODE
- // ----- SelectedItems -----
+ // ----- InputRequired -----
+ case PROPERTY_ID_INPUT_REQUIRED:
+ {
+ ::rtl::OUString sControlSource;
+ OSL_VERIFY( impl_getPropertyValue_throw( PROPERTY_CONTROLSOURCE ) >>= sControlSource );
+
+ sal_Bool bEmptyIsNULL = sal_False;
+ sal_Bool bHasEmptyIsNULL = impl_componentHasProperty_throw( PROPERTY_EMPTY_IS_NULL );
+ if ( bHasEmptyIsNULL )
+ OSL_VERIFY( impl_getPropertyValue_throw( PROPERTY_EMPTY_IS_NULL ) >>= bEmptyIsNULL );
+
+ // if the control is not bound to a DB field, there is no sense in having the "Input required"
+ // property
+ // Also, if an empty input of this control are *not* written as NULL, but as empty strings,
+ // then "Input required" does not make sense, too (since there's always an input, even if the control
+ // is empty).
+ _rxInspectorUI->enablePropertyUI( PROPERTY_INPUT_REQUIRED,
+ ( sControlSource.getLength() != 0 ) && ( !bHasEmptyIsNULL || bEmptyIsNULL )
+ );
+ }
+ break;
+
+ // ----- SelectedItems, DefaultSelection -----
case PROPERTY_ID_SELECTEDITEMS:
- // ----- DefaultSelection -----
case PROPERTY_ID_DEFAULT_SELECT_SEQ:
{
Sequence< ::rtl::OUString > aEntries;
@@ -2131,6 +2177,12 @@ namespace pcr
)
return true;
break;
+
+ case PROPERTY_ID_SCALEIMAGE:
+ if ( impl_componentHasProperty_throw( PROPERTY_SCALE_MODE ) )
+ // ScaleImage is superseded by ScaleMode
+ return true;
+ break;
}
sal_uInt32 nPropertyUIFlags = m_pInfoService->getPropertyUIFlags( _rProperty.Handle );
@@ -2658,11 +2710,15 @@ namespace pcr
//------------------------------------------------------------------------
bool FormComponentPropertyHandler::impl_browseForImage_nothrow( Any& _out_rNewValue, ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const
{
+ bool bIsLink = true;// reflect the legacy behavior
::rtl::OUString aStrTrans = m_pInfoService->getPropertyTranslation( PROPERTY_ID_IMAGE_URL );
::sfx2::FileDialogHelper aFileDlg(SFXWB_GRAPHIC);
aFileDlg.SetTitle(aStrTrans);
+ // non-linked images ( e.g. those located in the document
+ // stream ) cannot *currently* be handled by openoffice basic dialogs.
+ bool bHandleNonLink = ( m_eComponentClass == eFormControl );
Reference< XFilePickerControlAccess > xController(aFileDlg.GetFilePicker(), UNO_QUERY);
DBG_ASSERT(xController.is(), "FormComponentPropertyHandler::impl_browseForImage_nothrow: missing the controller interface on the file picker!");
@@ -2671,14 +2727,14 @@ namespace pcr
// do a preview by default
xController->setValue(ExtendedFilePickerElementIds::CHECKBOX_PREVIEW, 0, ::cppu::bool2any(sal_True));
- // "as link" is checked, but disabled
- xController->setValue(ExtendedFilePickerElementIds::CHECKBOX_LINK, 0, ::cppu::bool2any(sal_True));
- xController->enableControl(ExtendedFilePickerElementIds::CHECKBOX_LINK, sal_False);
+ xController->setValue(ExtendedFilePickerElementIds::CHECKBOX_LINK, 0, ::cppu::bool2any(bIsLink));
+ xController->enableControl(ExtendedFilePickerElementIds::CHECKBOX_LINK, bHandleNonLink );
+
}
::rtl::OUString sCurValue;
OSL_VERIFY( impl_getPropertyValue_throw( PROPERTY_IMAGE_URL ) >>= sCurValue );
- if ( sCurValue.getLength() != 0 )
+ if ( sCurValue.getLength() != 0 && sCurValue.compareToAscii(GRAPHOBJ_URLPREFIX, RTL_CONSTASCII_LENGTH(GRAPHOBJ_URLPREFIX) ) != 0 )
{
aFileDlg.SetDisplayDirectory( sCurValue );
// TODO: need to set the display directory _and_ the default name
@@ -2687,7 +2743,26 @@ namespace pcr
_rClearBeforeDialog.clear();
bool bSuccess = ( 0 == aFileDlg.Execute() );
if ( bSuccess )
- _out_rNewValue <<= (::rtl::OUString)aFileDlg.GetPath();
+ {
+ if ( bHandleNonLink && xController.is() )
+ {
+ xController->getValue(ExtendedFilePickerElementIds::CHECKBOX_LINK, 0) >>= bIsLink;
+ }
+ if ( !bIsLink )
+ {
+ Graphic aGraphic;
+ aFileDlg.GetGraphic( aGraphic );
+
+ Reference< graphic::XGraphicObject > xGrfObj = graphic::GraphicObject::create( m_aContext.getUNOContext() );
+ xGrfObj->setGraphic( aGraphic.GetXGraphic() );
+
+
+ _out_rNewValue <<= xGrfObj;
+
+ }
+ else
+ _out_rNewValue <<= (::rtl::OUString)aFileDlg.GetPath();
+ }
return bSuccess;
}
diff --git a/extensions/source/propctrlr/formmetadata.cxx b/extensions/source/propctrlr/formmetadata.cxx
index f64881a931d4..ae452a566337 100644
--- a/extensions/source/propctrlr/formmetadata.cxx
+++ b/extensions/source/propctrlr/formmetadata.cxx
@@ -158,6 +158,8 @@ namespace pcr
DEF_INFO_3( CELL_EXCHANGE_TYPE,CELL_EXCHANGE_TYPE, CELL_EXCHANGE_TYPE,FORM_VISIBLE, DATA_PROPERTY, ENUM ),
DEF_INFO_2( LIST_CELL_RANGE, LIST_CELL_RANGE, LIST_CELL_RANGE, FORM_VISIBLE, DATA_PROPERTY ),
DEF_INFO_3( CONTROLSOURCE, CONTROLSOURCE, CONTROLSOURCE, FORM_VISIBLE, DATA_PROPERTY, COMPOSEABLE ),
+ DEF_INFO_3( EMPTY_IS_NULL, EMPTY_IS_NULL, EMPTY_IS_NULL, FORM_VISIBLE, DATA_PROPERTY, COMPOSEABLE ),
+ DEF_INFO_3( INPUT_REQUIRED, INPUT_REQUIRED, INPUT_REQUIRED, FORM_VISIBLE, DATA_PROPERTY, COMPOSEABLE ),
DEF_INFO_3( REFVALUE, REFVALUE, REFVALUE, FORM_VISIBLE, DATA_PROPERTY, COMPOSEABLE ),
DEF_INFO_3( UNCHECKEDREFVALUE, UNCHECKEDREFVALUE, UNCHECKEDREFVALUE, FORM_VISIBLE, DATA_PROPERTY, COMPOSEABLE ),
DEF_INFO_3( DATASOURCE, DATASOURCE, DATASOURCE, FORM_VISIBLE, DATA_PROPERTY, COMPOSEABLE ),
@@ -174,7 +176,6 @@ namespace pcr
DEF_INFO_4( INSERTONLY, DATAENTRY, DATAENTRY, FORM_VISIBLE, DATA_PROPERTY, COMPOSEABLE, COMPOSEABLE ),
DEF_INFO_4( NAVIGATION, NAVIGATION, NAVIGATION, FORM_VISIBLE, DATA_PROPERTY, ENUM, COMPOSEABLE ),
DEF_INFO_4( CYCLE, CYCLE, CYCLE, FORM_VISIBLE, DATA_PROPERTY, ENUM, COMPOSEABLE ),
- DEF_INFO_3( EMPTY_IS_NULL, EMPTY_IS_NULL, EMPTY_IS_NULL, FORM_VISIBLE, DATA_PROPERTY, COMPOSEABLE ),
DEF_INFO_3( FILTERPROPOSAL, FILTERPROPOSAL, FILTERPROPOSAL, FORM_VISIBLE, DATA_PROPERTY, COMPOSEABLE ),
DEF_INFO_4( LISTSOURCETYPE, LISTSOURCETYPE, LISTSOURCETYPE, FORM_VISIBLE, DATA_PROPERTY, ENUM, COMPOSEABLE ),
DEF_INFO_3( LISTSOURCE, LISTSOURCE, LISTSOURCE, FORM_VISIBLE, DATA_PROPERTY, COMPOSEABLE ),
@@ -340,6 +341,7 @@ namespace pcr
DEF_INFO_3( IMAGE_URL, IMAGE_URL, IMAGE_URL, FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
DEF_INFO_4( IMAGEPOSITION, IMAGEPOSITION, IMAGEPOSITION, FORM_VISIBLE, DIALOG_VISIBLE, ENUM, COMPOSEABLE ),
DEF_INFO_3( SCALEIMAGE, SCALEIMAGE, SCALEIMAGE, FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
+ DEF_INFO_4( SCALE_MODE, SCALEIMAGE, SCALEIMAGE, FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE, ENUM ),
DEF_INFO_2( DEFAULT_SELECT_SEQ,DEFAULT_SELECT_SEQ, DEFAULT_SELECT_SEQ,FORM_VISIBLE, COMPOSEABLE ),
DEF_INFO_2( SELECTEDITEMS, SELECTEDITEMS, SELECTEDITEMS, DIALOG_VISIBLE, COMPOSEABLE ),
DEF_INFO_3( ECHO_CHAR, ECHO_CHAR, ECHO_CHAR, FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
@@ -503,8 +505,12 @@ namespace pcr
case PROPERTY_ID_SELECTION_TYPE:
nStringItemsResId = RID_RSC_ENUM_SELECTION_TYPE;
break;
+ case PROPERTY_ID_SCALE_MODE:
+ nStringItemsResId = RID_RSC_ENUM_SCALE_MODE;
+ break;
default:
OSL_ENSURE( sal_False, "OPropertyInfoService::getPropertyEnumRepresentations: unknown enum property!" );
+ break;
}
::std::vector< ::rtl::OUString > aReturn;
diff --git a/extensions/source/propctrlr/formmetadata.hxx b/extensions/source/propctrlr/formmetadata.hxx
index c0b20071153a..a86eac088c7f 100644
--- a/extensions/source/propctrlr/formmetadata.hxx
+++ b/extensions/source/propctrlr/formmetadata.hxx
@@ -323,20 +323,23 @@ namespace pcr
#define PROPERTY_ID_XSD_MAX_EXCLUSIVE_DATE_TIME 179
#define PROPERTY_ID_XSD_MIN_INCLUSIVE_DATE_TIME 180
#define PROPERTY_ID_XSD_MIN_EXCLUSIVE_DATE_TIME 181
- #define PROPERTY_ID_UNCHECKEDREFVALUE 182
- #define PROPERTY_ID_SUBMISSION_ID 183
- #define PROPERTY_ID_XFORMS_BUTTONTYPE 184
- #define PROPERTY_ID_LIST_BINDING 185
- #define PROPERTY_ID_VERTICAL_ALIGN 186
- #define PROPERTY_ID_BINDING_NAME 187
- #define PROPERTY_ID_DECORATION 188
- #define PROPERTY_ID_SELECTION_TYPE 189
- #define PROPERTY_ID_ROOT_DISPLAYED 190
- #define PROPERTY_ID_SHOWS_HANDLES 191
- #define PROPERTY_ID_SHOWS_ROOT_HANDLES 192
- #define PROPERTY_ID_EDITABLE 193
- #define PROPERTY_ID_INVOKES_STOP_NOT_EDITING 194
- #define PROPERTY_ID_NOLABEL 195
+ #define PROPERTY_ID_UNCHECKEDREFVALUE 182
+ #define PROPERTY_ID_SUBMISSION_ID 183
+ #define PROPERTY_ID_XFORMS_BUTTONTYPE 184
+ #define PROPERTY_ID_LIST_BINDING 185
+ #define PROPERTY_ID_VERTICAL_ALIGN 186
+ #define PROPERTY_ID_BINDING_NAME 187
+ #define PROPERTY_ID_DECORATION 188
+ #define PROPERTY_ID_SELECTION_TYPE 189
+ #define PROPERTY_ID_ROOT_DISPLAYED 190
+ #define PROPERTY_ID_SHOWS_HANDLES 191
+ #define PROPERTY_ID_SHOWS_ROOT_HANDLES 192
+ #define PROPERTY_ID_EDITABLE 193
+ #define PROPERTY_ID_INVOKES_STOP_NOT_EDITING 194
+ #define PROPERTY_ID_NOLABEL 195
+ #define PROPERTY_ID_SCALE_MODE 196
+ #define PROPERTY_ID_INPUT_REQUIRED 197
+
//............................................................................
} // namespace pcr
//............................................................................
diff --git a/extensions/source/propctrlr/formres.src b/extensions/source/propctrlr/formres.src
index 7f4f9b31c8db..66faf679467d 100644
--- a/extensions/source/propctrlr/formres.src
+++ b/extensions/source/propctrlr/formres.src
@@ -1382,3 +1382,23 @@ String RID_STR_NOLABEL
{
Text [ en-US ] = "No Label" ;
};
+
+Resource RID_RSC_ENUM_SCALE_MODE
+{
+ String 1
+ {
+ Text [ en-US ] = "No";
+ };
+ String 2
+ {
+ Text [ en-US ] = "Keep Ratio";
+ };
+ String 3
+ {
+ Text [ en-US ] = "Fit to Size";
+ };
+};
+String RID_STR_INPUT_REQUIRED
+{
+ Text [ en-US ] = "Input required";
+};
diff --git a/extensions/source/propctrlr/formresid.hrc b/extensions/source/propctrlr/formresid.hrc
index e7f3ebd89b49..db494a5ceaa3 100644
--- a/extensions/source/propctrlr/formresid.hrc
+++ b/extensions/source/propctrlr/formresid.hrc
@@ -147,7 +147,7 @@
#define RID_STR_TAG ( RID_FORMBROWSER_START + 116 )
#define RID_STR_HELPTEXT ( RID_FORMBROWSER_START + 117 )
#define RID_STR_HELPURL ( RID_FORMBROWSER_START + 118 )
- // FREE
+#define RID_STR_INPUT_REQUIRED ( RID_FORMBROWSER_START + 119 )
#define RID_STR_UNCHECKEDREFVALUE ( RID_FORMBROWSER_START + 120 )
#define RID_STR_CURSOR_TYPE ( RID_FORMBROWSER_START + 121 )
// FREE
@@ -336,6 +336,7 @@
#define RID_RSC_ENUM_CELL_EXCHANGE_TYPE ( RID_PROPCONTROLLER_START + 23 )
#define RID_RSC_ENUM_SUBMIT_TARGET ( RID_PROPCONTROLLER_START + 24 )
#define RID_RSC_ENUM_SELECTION_TYPE ( RID_PROPCONTROLLER_START + 25 )
+#define RID_RSC_ENUM_SCALE_MODE ( RID_PROPCONTROLLER_START + 26 )
// -----------------------------------------------------------------------
// - ImageList - local ids
diff --git a/extensions/source/propctrlr/formstrings.hxx b/extensions/source/propctrlr/formstrings.hxx
index 64b9181a7e12..23f677a658bc 100644
--- a/extensions/source/propctrlr/formstrings.hxx
+++ b/extensions/source/propctrlr/formstrings.hxx
@@ -55,6 +55,7 @@ namespace pcr
PCR_CONSTASCII_STRING( PROPERTY_NAVIGATION, "NavigationBarMode");
PCR_CONSTASCII_STRING( PROPERTY_CYCLE, "Cycle");
PCR_CONSTASCII_STRING( PROPERTY_CONTROLSOURCE, "DataField");
+ PCR_CONSTASCII_STRING( PROPERTY_INPUT_REQUIRED, "InputRequired");
PCR_CONSTASCII_STRING( PROPERTY_ENABLED, "Enabled");
PCR_CONSTASCII_STRING( PROPERTY_READONLY, "ReadOnly");
PCR_CONSTASCII_STRING( PROPERTY_ISREADONLY, "IsReadOnly");
@@ -182,6 +183,7 @@ namespace pcr
PCR_CONSTASCII_STRING( PROPERTY_STATE, "State");
PCR_CONSTASCII_STRING( PROPERTY_TIME, "Time");
PCR_CONSTASCII_STRING( PROPERTY_SCALEIMAGE, "ScaleImage");
+ PCR_CONSTASCII_STRING( PROPERTY_SCALE_MODE, "ScaleMode");
PCR_CONSTASCII_STRING( PROPERTY_PUSHBUTTONTYPE, "PushButtonType");
PCR_CONSTASCII_STRING( PROPERTY_EFFECTIVE_VALUE, "EffectiveValue");
PCR_CONSTASCII_STRING( PROPERTY_SELECTEDITEMS, "SelectedItems");
diff --git a/extensions/source/propctrlr/makefile.mk b/extensions/source/propctrlr/makefile.mk
index 84f631799c45..78ccf211d8de 100644
--- a/extensions/source/propctrlr/makefile.mk
+++ b/extensions/source/propctrlr/makefile.mk
@@ -8,7 +8,7 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.23 $
+# $Revision: 1.23.84.2 $
#
# This file is part of OpenOffice.org.
#
diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx
index 760004f0d077..b4ec5c0476f7 100644
--- a/extensions/source/propctrlr/propcontroller.cxx
+++ b/extensions/source/propctrlr/propcontroller.cxx
@@ -1384,6 +1384,18 @@ namespace pcr
{
try
{
+ rtl::OUString sPlcHolder = String( PcrRes( RID_EMBED_IMAGE_PLACEHOLDER ) );
+ bool bIsPlaceHolderValue = false;
+
+ if ( rName.equals( PROPERTY_IMAGE_URL ) )
+ {
+ // if the prop value is the PlaceHolder
+ // can ignore it
+ rtl::OUString sVal;
+ _rValue >>= sVal;
+ if ( sVal.equals( sPlcHolder ) )
+ bIsPlaceHolderValue = true;
+ }
m_sCommittingProperty = rName;
bool bIsActuatingProperty = impl_isActuatingProperty_nothrow( rName );
@@ -1396,8 +1408,9 @@ namespace pcr
PropertyHandlerRef handler = impl_getHandlerForProperty_throw( rName );
//////////////////////////////////////////////////////////////////////
- // set the value
- handler->setPropertyValue( rName, _rValue );
+ // set the value ( only if it's not a placeholder )
+ if ( !bIsPlaceHolderValue )
+ handler->setPropertyValue( rName, _rValue );
//////////////////////////////////////////////////////////////////////
// re-retrieve the value
@@ -1739,7 +1752,7 @@ namespace pcr
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "OPropertyBrowserController::impl_broadcastPropertyChange_nothrow: caught an exception while calling the handlers!" );
+ DBG_UNHANDLED_EXCEPTION();
}
}
diff --git a/extensions/source/propctrlr/propres.src b/extensions/source/propctrlr/propres.src
index 1cfbc6b64d2a..207915e1dee9 100644
--- a/extensions/source/propctrlr/propres.src
+++ b/extensions/source/propctrlr/propres.src
@@ -52,3 +52,7 @@ String RID_STR_HELP_SECTION_LABEL
{
Text [ en-US ] = "Help";
};
+String RID_EMBED_IMAGE_PLACEHOLDER
+{
+ Text [ en-US ] = "<Embedded-Image>";
+};
diff --git a/extensions/source/propctrlr/propresid.hrc b/extensions/source/propctrlr/propresid.hrc
index dacc65b946c5..aa66089b34d7 100644
--- a/extensions/source/propctrlr/propresid.hrc
+++ b/extensions/source/propctrlr/propresid.hrc
@@ -46,5 +46,6 @@
#define RID_STR_PROPPAGE_DATA ( RID_PROPCONTROLLER_START + 2 )
#define RID_STR_BOOL ( RID_PROPCONTROLLER_START + 3 )
#define RID_STR_HELP_SECTION_LABEL ( RID_PROPCONTROLLER_START + 4 )
+#define RID_EMBED_IMAGE_PLACEHOLDER ( RID_PROPCONTROLLER_START + 5 )
#endif // EXTENSIONS_PROPRESID_HRC
diff --git a/extensions/source/propctrlr/usercontrol.cxx b/extensions/source/propctrlr/usercontrol.cxx
index 0dd183d2fb68..005659f3576a 100644
--- a/extensions/source/propctrlr/usercontrol.cxx
+++ b/extensions/source/propctrlr/usercontrol.cxx
@@ -42,7 +42,8 @@
#include <svtools/zformat.hxx>
#include <connectivity/dbconversion.hxx>
#include <com/sun/star/util/Time.hpp>
-
+#include "modulepcr.hxx"
+#include "propresid.hrc"
//............................................................................
namespace pcr
{
@@ -271,6 +272,7 @@ namespace pcr
:OFileUrlControl_Base( PropertyControlType::Unknown, pParent, nWinStyle | WB_DROPDOWN )
{
getTypedControlWindow()->SetDropDownLineCount( 10 );
+ getTypedControlWindow()->SetPlaceHolder( String( PcrRes( RID_EMBED_IMAGE_PLACEHOLDER ) ) ) ;
}
//------------------------------------------------------------------
@@ -282,8 +284,13 @@ namespace pcr
void SAL_CALL OFileUrlControl::setValue( const Any& _rValue ) throw (IllegalTypeException, RuntimeException)
{
::rtl::OUString sURL;
- if ( _rValue >>= sURL )
- getTypedControlWindow()->DisplayURL( sURL );
+ if ( ( _rValue >>= sURL ) )
+ {
+ if ( sURL.indexOf( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.GraphicObject:" ) ) ) == 0 )
+ getTypedControlWindow()->DisplayURL( getTypedControlWindow()->GetPlaceHolder() );
+ else
+ getTypedControlWindow()->DisplayURL( sURL );
+ }
else
getTypedControlWindow()->SetText( String() );
}
@@ -293,7 +300,7 @@ namespace pcr
{
Any aPropValue;
if ( getTypedControlWindow()->GetText().Len() )
- aPropValue <<= (::rtl::OUString)getTypedControlWindow()->GetURL();
+ aPropValue <<= (::rtl::OUString)getTypedControlWindow()->GetURL();
return aPropValue;
}
diff --git a/extensions/util/hidother.src b/extensions/util/hidother.src
index 82f311851863..e2c56da5d130 100644
--- a/extensions/util/hidother.src
+++ b/extensions/util/hidother.src
@@ -306,3 +306,4 @@ hidspecial HID_CHECK_FOR_UPD_STATUS { HelpId = HID_CHECK_FOR_UPD_STA
hidspecial HID_CHECK_FOR_UPD_DESCRIPTION { HelpId = HID_CHECK_FOR_UPD_DESCRIPTION; }
hidspecial HID_CHECK_FOR_UPD_CANCEL { HelpId = HID_CHECK_FOR_UPD_CANCEL; }
hidspecial HID_PROP_NOLABEL { HelpId = HID_PROP_NOLABEL; }
+hidspecial HID_PROP_INPUT_REQUIRED { HelpId = HID_PROP_INPUT_REQUIRED; }