summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorRelease Engineers <releng@openoffice.org>2009-08-06 12:44:16 +0000
committerRelease Engineers <releng@openoffice.org>2009-08-06 12:44:16 +0000
commit9732a509373732db8036bab56ad404ef69d62510 (patch)
tree70908cf33e93ee02696ea86089be8f9756bae864 /svtools
parent2402421ffe33e7e5ae2f8f6f5fb86b5acf26ad2b (diff)
CWS-TOOLING: integrate CWS os132
2009-07-21 15:24:18 +0200 os r274201 : #i103696# SwXTextPortion/SwXParagraph excluded 2009-07-15 13:19:17 +0200 os r274007 : #i103564# typo 2009-07-15 13:09:30 +0200 os r274005 : #i103564# SwFrames::hasElements 2009-07-15 13:02:16 +0200 os r274003 : #i103564# SwXBookmark::getPropertySetInfo fixed 2009-06-26 10:11:00 +0200 os r273395 : CWS-TOOLING: rebase CWS os132 to trunk@272827 (milestone: DEV300:m50) 2009-06-23 08:52:24 +0200 os r273256 : #i102764# patch: attribute ListBoxes correctly handled in ::Reset() 2009-06-23 08:51:31 +0200 os r273255 : #i102764# ResetColor() added to remove background color 2009-06-22 14:57:38 +0200 os r273233 : #i102619# prevent access to already destroyed shell 2009-06-18 13:26:51 +0200 os r273112 : #i99508# ::insertTextContent: re-route to ::attach() 2009-06-18 10:59:53 +0200 os r273107 : #i85405# patch to enable 'Print grid' CheckBox correctly 2009-06-18 10:54:02 +0200 os r273106 : #i85133# dispose connection in GetColumnFmt to prevent connection locking 2009-06-18 10:24:31 +0200 os r273104 : #99535# ExportGraphic changed 2009-06-18 10:24:03 +0200 os r273103 : #99535# ExportGraphic changed 2009-06-18 10:23:11 +0200 os r273102 : #i102841# redlining mode switches to insert mode (cmc) 2009-06-17 14:05:42 +0200 os r273070 : #i102111# do not save already saved HTML documents before switching to source veiw 2009-06-17 13:18:20 +0200 os r273063 : #i101825# set rembered start position at the real start not at the initial start 2009-06-17 08:24:10 +0200 os r273048 : #99535# no dierect access to the file picker interface 2009-06-16 15:00:12 +0200 os r273020 : #i99937# notification of user options changes re-introduced 2009-06-15 14:36:03 +0200 os r272987 : #i98032# unreplaced text in protected areas must not be attributed either 2009-06-15 14:20:26 +0200 os r272985 : #i98032# replace list has to be initialised 2009-06-04 13:29:02 +0200 os r272624 : #i97810# set focus into column page 2009-06-04 11:01:14 +0200 os r272617 : #i98164# dialog resize to ease localisation 2009-06-04 10:59:44 +0200 os r272616 : #i98164# dialog resize to ease localisation 2009-05-28 16:05:03 +0200 os r272413 : #i98172# ConvertFieldsToText: take care of tabs with attributes 2009-05-28 11:12:45 +0200 os r272385 : #i59361# dialog controls resized 2009-05-28 11:03:14 +0200 os r272383 : #i59174# dialog controls moved
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/config/useroptions.cxx107
1 files changed, 73 insertions, 34 deletions
diff --git a/svtools/source/config/useroptions.cxx b/svtools/source/config/useroptions.cxx
index aad000a235f1..4eafbefe54a3 100644
--- a/svtools/source/config/useroptions.cxx
+++ b/svtools/source/config/useroptions.cxx
@@ -49,51 +49,45 @@
#include <rtl/logfile.hxx>
#include "itemholder2.hxx"
-#ifndef _COM_SUN_STAR_BEANS_PROPERTY_HPP_
#include <com/sun/star/beans/Property.hpp>
-#endif
-
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
-
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
#include <com/sun/star/container/XNameContainer.hpp>
-#endif
-
-#ifndef _COM_SUN_STAR_LANG_XSINGLESERVICEFACTORY_HPP_
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#endif
-
-#ifndef _COMPHELPER_CONFIGURATIONHELPER_HXX_
+#include <com/sun/star/util/XChangesListener.hpp>
+#include <com/sun/star/util/XChangesNotifier.hpp>
+#include <com/sun/star/util/ChangesEvent.hpp>
#include <comphelper/configurationhelper.hxx>
-#endif
-
-#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_
#include <unotools/processfactory.hxx>
-#endif
-
-#ifndef _SVT_LOGHELPER_HXX
-#include "loghelper.hxx"
-#endif
+#include <loghelper.hxx>
using namespace utl;
using namespace rtl;
+using namespace com::sun::star;
using namespace com::sun::star::uno;
namespace css = ::com::sun::star;
// class SvtUserOptions_Impl ---------------------------------------------
+class SvtUserOptions_Impl;
+class SvtUserConfigChangeListener_Impl : public cppu::WeakImplHelper1
+<
+ com::sun::star::util::XChangesListener
+>
+{
+ SvtUserOptions_Impl& m_rParent;
+ public:
+ SvtUserConfigChangeListener_Impl(SvtUserOptions_Impl& rParent);
+ ~SvtUserConfigChangeListener_Impl();
+
+ //XChangesListener
+ virtual void SAL_CALL changesOccurred( const util::ChangesEvent& Event ) throw(RuntimeException);
+ //XEventListener
+ virtual void SAL_CALL disposing( const lang::EventObject& Source ) throw(RuntimeException);
+};
-class SvtUserOptions_Impl
+class SvtUserOptions_Impl : public SfxBroadcaster
{
public:
SvtUserOptions_Impl();
@@ -144,8 +138,10 @@ public:
sal_Bool IsTokenReadonly( USHORT nToken ) const;
::rtl::OUString GetToken(USHORT nToken) const;
+ void Notify();
private:
+ uno::Reference< util::XChangesListener > m_xChangeListener;
css::uno::Reference< css::container::XNameAccess > m_xCfg;
css::uno::Reference< css::beans::XPropertySet > m_xData;
::rtl::OUString m_aLocale;
@@ -158,18 +154,47 @@ static sal_Int32 nRefCount = 0;
#define READONLY_DEFAULT sal_False
-// functions -------------------------------------------------------------
+/*-- 16.06.2009 14:22:56---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+SvtUserConfigChangeListener_Impl::SvtUserConfigChangeListener_Impl(SvtUserOptions_Impl& rParent) :
+ m_rParent( rParent )
+{
+}
+/*-- 16.06.2009 14:22:56---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+SvtUserConfigChangeListener_Impl::~SvtUserConfigChangeListener_Impl()
+{
+}
+/*-- 16.06.2009 14:22:56---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+void SvtUserConfigChangeListener_Impl::changesOccurred( const util::ChangesEvent& rEvent ) throw(RuntimeException)
+{
+ if(rEvent.Changes.getLength())
+ m_rParent.Notify();
+}
+/*-- 16.06.2009 14:22:56---------------------------------------------------
-namespace
+ -----------------------------------------------------------------------*/
+void SvtUserConfigChangeListener_Impl::disposing( const lang::EventObject& rSource ) throw(RuntimeException)
{
- struct PropertyNames
- : public rtl::Static< Sequence< rtl::OUString >, PropertyNames> {};
+ try
+ {
+ uno::Reference< util::XChangesNotifier > xChgNot( rSource.Source, UNO_QUERY_THROW);
+ xChgNot->removeChangesListener(this);
+ }
+ catch(Exception& )
+ {
+ }
}
// class SvtUserOptions_Impl ---------------------------------------------
// -----------------------------------------------------------------------
-SvtUserOptions_Impl::SvtUserOptions_Impl()
+SvtUserOptions_Impl::SvtUserOptions_Impl() :
+ m_xChangeListener( new SvtUserConfigChangeListener_Impl(*this) )
{
try
{
@@ -181,6 +206,14 @@ SvtUserOptions_Impl::SvtUserOptions_Impl()
css::uno::UNO_QUERY );
m_xData = css::uno::Reference< css::beans::XPropertySet >(m_xCfg, css::uno::UNO_QUERY);
+ uno::Reference< util::XChangesNotifier > xChgNot( m_xCfg, UNO_QUERY);
+ try
+ {
+ xChgNot->addChangesListener( m_xChangeListener );
+ }
+ catch(RuntimeException& )
+ {
+ }
}
catch(const css::uno::Exception& ex)
{
@@ -743,6 +776,12 @@ void SvtUserOptions_Impl::SetApartment( const ::rtl::OUString& sApartment )
// -----------------------------------------------------------------------
+void SvtUserOptions_Impl::Notify()
+{
+ Broadcast( SfxSimpleHint( SFX_HINT_USER_OPTIONS_CHANGED ) );
+}
+// -----------------------------------------------------------------------
+
sal_Bool SvtUserOptions_Impl::IsTokenReadonly( USHORT nToken ) const
{
css::uno::Reference< css::beans::XPropertySet > xData(m_xCfg, css::uno::UNO_QUERY);
@@ -906,7 +945,7 @@ SvtUserOptions::SvtUserOptions()
}
++nRefCount;
pImp = pOptions;
- //StartListening( *pImp);
+ StartListening( *pImp);
}
// -----------------------------------------------------------------------