summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2009-04-24 18:34:24 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2009-04-24 18:34:24 +0000
commit819f089c0a9e3512e8674651d05b4173fd6a811f (patch)
tree2364b34a7f14874830b26eaa15e6a5fee225243e
parent091f73440dc7659c59f8bb83f50e34c811c5372b (diff)
CWS-TOOLING: integrate CWS dba31m_DEV300
2009-04-08 21:06:02 +0200 fs r270660 : #i100956# hold the assigned events in the ModelImpl, not in the DatabaseDocument, so they survive the model being destroyed 2009-04-08 12:40:13 +0200 b_michaelsen r270635 : #i100928# Opening the Tools->Options->Improvement Program Tabpage on first start accidently activates Usage Tracking 2009-04-07 12:56:29 +0200 fs r270594 : #i100866# don't call into the StatusIndicator with our mutex locked 2009-04-07 10:31:02 +0200 fs r270581 : #i100866# impl_import_throw -> impl_import_nolck_throw 2009-04-06 22:53:10 +0200 fs r270575 : #i100866# some more mutex lock tweaking 2009-04-06 22:01:51 +0200 fs r270573 : #i100861# load the Show/Hide strings from the proper (an existing, in particular) resource 2009-04-06 12:43:16 +0200 fs r270537 : #i100866# notifyEvent: instantiate the ScriptDocument only when required. 2009-04-06 12:42:03 +0200 fs r270536 : #i100866# rework how and when it is determined whether the DBDoc or sub documents contain scripts/macros. In particular, cache this information in the ODatabaseDocument implementation, so that queryInterface does not need to lock the mutex 2009-04-03 10:21:02 +0200 oj r270465 : #i100789# surround uno call with try catch 2009-04-03 09:18:37 +0200 oj r270453 : #i100789# check token is not null
-rw-r--r--basctl/source/basicide/doceventnotifier.cxx23
-rw-r--r--extensions/source/propctrlr/formcomponenthandler.cxx23
-rw-r--r--extensions/source/propctrlr/formresid.hrc2
3 files changed, 36 insertions, 12 deletions
diff --git a/basctl/source/basicide/doceventnotifier.cxx b/basctl/source/basicide/doceventnotifier.cxx
index e4332891d1d1..f97420da5926 100644
--- a/basctl/source/basicide/doceventnotifier.cxx
+++ b/basctl/source/basicide/doceventnotifier.cxx
@@ -140,8 +140,7 @@ namespace basctl
//--------------------------------------------------------------------
void SAL_CALL DocumentEventNotifier_Impl::notifyEvent( const EventObject& _rEvent ) throw (RuntimeException)
{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::ClearableMutexGuard aGuard( m_aMutex );
OSL_PRECOND( !impl_isDisposed_nothrow(), "DocumentEventNotifier_Impl::notifyEvent: disposed, but still getting events?" );
if ( impl_isDisposed_nothrow() )
@@ -151,7 +150,6 @@ namespace basctl
OSL_ENSURE( xDocument.is(), "DocumentEventNotifier_Impl::notifyEvent: illegal source document!" );
if ( !xDocument.is() )
return;
- ScriptDocument aDocument( xDocument );
struct EventEntry
{
@@ -172,8 +170,24 @@ namespace basctl
for ( size_t i=0; i < sizeof( aEvents ) / sizeof( aEvents[0] ); ++i )
{
- if ( _rEvent.EventName.equalsAscii( aEvents[i].pEventName ) )
+ if ( !_rEvent.EventName.equalsAscii( aEvents[i].pEventName ) )
+ continue;
+
+ ScriptDocument aDocument( xDocument );
+ {
+ // the listener implementations usually require the SolarMutex, so lock it here.
+ // But ensure the proper order of locking the solar and the own mutex
+ aGuard.clear();
+ ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
+ ::osl::MutexGuard aGuard2( m_aMutex );
+
+ if ( impl_isDisposed_nothrow() )
+ // somebody took the chance to dispose us -> bail out
+ return;
+
(m_pListener->*aEvents[i].listenerMethod)( aDocument );
+ }
+ break;
}
}
@@ -250,7 +264,6 @@ namespace basctl
//--------------------------------------------------------------------
void DocumentEventNotifier::dispose()
{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
m_pImpl->dispose();
}
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index c413de6e7e44..b6dc84dff225 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -559,8 +559,12 @@ namespace pcr
::rtl::OUString sControlValue;
OSL_VERIFY( _rControlValue >>= sControlValue );
- String sShowHide = String( PcrRes( RID_STR_SHOW_HIDE ) );
- aPropertyValue <<= (sal_Bool)( sShowHide.GetToken(1) == String( sControlValue ) );
+ ::std::vector< ::rtl::OUString > aListEntries;
+ tools::StringListResource aRes( PcrRes( RID_RSC_ENUM_SHOWHIDE ), aListEntries );
+ OSL_ENSURE( aListEntries.size() == 2, "FormComponentPropertyHandler::convertToPropertyValue: broken resource for Show/Hide!" );
+ sal_Bool bShow = ( aListEntries.size() < 2 ) || ( sControlValue == aListEntries[1] );
+
+ aPropertyValue <<= bShow;
}
break;
@@ -661,10 +665,17 @@ namespace pcr
case PROPERTY_ID_SHOW_RECORDACTIONS:
case PROPERTY_ID_SHOW_FILTERSORT:
{
- String aEntries = PcrRes( RID_STR_SHOW_HIDE );
- ::rtl::OUString sControlValue(
- ::comphelper::getBOOL( _rPropertyValue ) ? aEntries.GetToken( 1 ) : aEntries.GetToken( 0 ) );
- aControlValue <<= sControlValue;
+ ::std::vector< ::rtl::OUString > aListEntries;
+ tools::StringListResource aRes( PcrRes( RID_RSC_ENUM_SHOWHIDE ), aListEntries );
+ OSL_ENSURE( aListEntries.size() == 2, "FormComponentPropertyHandler::convertToControlValue: broken resource for Show/Hide!" );
+
+ if ( aListEntries.size() == 2 )
+ {
+ ::rtl::OUString sControlValue = ::comphelper::getBOOL( _rPropertyValue )
+ ? aListEntries[1]
+ : aListEntries[0];
+ aControlValue <<= sControlValue;
+ }
}
break;
diff --git a/extensions/source/propctrlr/formresid.hrc b/extensions/source/propctrlr/formresid.hrc
index badda59d2d2c..cfd9e7aaebfe 100644
--- a/extensions/source/propctrlr/formresid.hrc
+++ b/extensions/source/propctrlr/formresid.hrc
@@ -248,7 +248,7 @@
#define RID_STR_HIDEINACTIVESELECTION ( RID_FORMBROWSER_START + 217 )
#define RID_STR_VISUALEFFECT ( RID_FORMBROWSER_START + 218 )
#define RID_STR_BORDERCOLOR ( RID_FORMBROWSER_START + 219 )
-#define RID_STR_SHOW_HIDE ( RID_FORMBROWSER_START + 220 )
+ // FREE
#define RID_STR_XML_DATA_MODEL ( RID_FORMBROWSER_START + 221 )
#define RID_STR_BIND_EXPRESSION ( RID_FORMBROWSER_START + 222 )
#define RID_STR_XSD_REQUIRED ( RID_FORMBROWSER_START + 223 )