summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toolkit/source/controls/dialogcontrol.cxx47
1 files changed, 45 insertions, 2 deletions
diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx
index fa34f7e7b24e..7dd4119cac2a 100644
--- a/toolkit/source/controls/dialogcontrol.cxx
+++ b/toolkit/source/controls/dialogcontrol.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: dialogcontrol.cxx,v $
*
- * $Revision: 1.15 $
+ * $Revision: 1.16 $
*
- * last change: $Author: hr $ $Date: 2007-01-02 15:34:44 $
+ * last change: $Author: rt $ $Date: 2007-01-29 16:25:48 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -106,6 +106,21 @@ using namespace toolkit;
#define PROPERTY_RESOURCERESOLVER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ResourceResolver" ))
+struct LanguageDependentProp
+{
+ const char* pPropName;
+ sal_Int32 nPropNameLength;
+};
+
+// Attention: Please update both statics (count/array)!
+static const sal_uInt32 nLanguageDependentDialogPropCount = 2;
+static LanguageDependentProp aLanguageDependentDialogProp[] =
+{
+ { "Title", 5 },
+ { "HelpText", 8 },
+ { 0, 0 }
+};
+
// ----------------------------------------------------------------------------
// functor for disposing a control model
struct DisposeControlModel : public ::std::unary_function< Reference< XControlModel >, void >
@@ -1693,6 +1708,34 @@ void UnoDialogControl::ImplUpdateResourceResolver()
}
}
}
+
+ // propagate resource resolver changes to language dependent props of the dialog
+ Reference< XPropertySet > xPropertySet( getModel(), UNO_QUERY );
+ if ( xPropertySet.is() )
+ {
+ Reference< XMultiPropertySet > xMultiPropSet( xPropertySet, UNO_QUERY );
+ Reference< XPropertiesChangeListener > xListener( xPropertySet, UNO_QUERY );
+
+ aPropNames.realloc( nLanguageDependentDialogPropCount );
+
+ sal_Int32 i = 0;
+ const LanguageDependentProp* pLangProps = aLanguageDependentDialogProp;
+ while ( pLangProps->pPropName != 0 )
+ {
+ if ( aPropNames.getLength() == i )
+ aPropNames.realloc(i+1);
+ aPropNames[i++] = rtl::OUString::createFromAscii( pLangProps->pPropName );
+ ++pLangProps;
+ }
+
+ try
+ {
+ xMultiPropSet->firePropertiesChangeEvent( aPropNames, xListener );
+ }
+ catch ( NoSuchElementException& )
+ {
+ }
+ }
}
}