summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2009-11-27 12:39:32 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2009-11-27 12:39:32 +0000
commitd5c799bd36d600f4ebbce76f12333324bc1f6c09 (patch)
tree303efe2ce352ac42f7cf72f432d22ad2cd410e0b /framework
parentc18e25b533b12d73ae8bc58564f9eda45c26e3b1 (diff)
dba33a: summary migration from SVN
2009-11-06 13:10:39 +0000 msc r277387 : minor fix for automatic test 2009-11-06 13:09:33 +0000 msc r277385 : minor fix for automatic test 2009-11-06 12:30:57 +0000 fs r277383 : argh. On some virtual machines, waiting 5 seconds for the event to arrive is not enough. Increasing the timeout ... 2009-11-06 12:13:34 +0000 fs r277382 : this diagnostic code should not have slipped in 2009-11-05 13:21:06 +0000 fs r277369 : SHL2NOCHECK=TRUE (requested by hjs) 2009-11-04 14:09:46 +0000 msc r277355 : minor fix for automatic testing 2009-11-04 13:23:02 +0000 msc r277352 : minor fix for automatic testing 2009-11-04 10:53:28 +0000 msc r277341 : minor fix for automated testscript 2009-11-04 08:30:58 +0000 msc r277333 : minor fix for automatic test 2009-11-04 08:15:43 +0000 msc r277332 : minor fix for automatic test 2009-11-03 14:25:44 +0000 fs r277324 : #i10000# 2009-11-03 09:47:47 +0000 fs r277315 : found yet another help ID zombie ... moved formhelpid.hrc content to propctrlr.hrc, where it belongs 2009-11-03 08:50:24 +0000 fs r277312 : use createTempFileURL, which cares for some more specialities ... 2009-11-03 08:44:55 +0000 fs r277311 : when creating a temp file for purpose of getting a temp file URL, the delete the file immediately. On some machines/JVMs, the file exists, with write access denied, which isn't Good (TM) 2009-10-22 13:06:17 +0000 fs r277126 : removed wrong assertion 2009-10-21 08:10:35 +0000 fs r277077 : reverted the previous change, which was nonsense 2009-10-21 07:19:43 +0000 fs r277076 : export the component_foo functions, now that some of the objects are built with VISIBILITY_HIDDEN=TRUE 2009-10-21 07:08:35 +0000 fs r277075 : spare useless call 2009-10-20 21:26:31 +0000 fs r277072 : #i10000# 2009-10-20 08:06:04 +0000 fs r277039 : CWS-TOOLING: rebase CWS dba33a to trunk@277035 (milestone: DEV300:m62) 2009-10-16 09:55:25 +0000 fs r276960 : remove one of the superfluous implts_doLayout calls introduced with the previous patch 2009-10-15 13:18:52 +0000 fs r276941 : removed the basic tests. According to cn, they're not used anymore (for a long time), and according to 'du -h', they take up 6.0M on my hard disc. For too much for useless code, /me thinks. 2009-10-15 13:06:51 +0000 fs r276940 : #i10000# remove useless include (otherwise the compiler warning it provokes would need to be fixed by declaring VISIBILITY_HIDDEN=TRUE in the makefile.mk) 2009-10-15 12:52:39 +0000 fs r276939 : #i10000# 2009-10-15 12:44:26 +0000 fs r276938 : #i10000# 2009-10-15 12:00:33 +0000 fs r276936 : #i10000# 2009-10-15 10:31:37 +0000 fs r276934 : #i105259# prepare for the Hidden arg 2009-10-15 10:31:05 +0000 fs r276933 : IsMaximized -> const 2009-10-15 09:50:15 +0000 fs r276932 : during #i105259#: introduce an option to the layout manager to preserve, if possible, the size of the content window when layouting. Enable this option for embedded (SFX-based) documents opened for outplace editing. (the option is incompatible with in-place editing, anyway) This is because such embedded objects couple the (content) window size to the VisAreaSize, in that both are used interchangeably. When an embedded object is closed, it remembers the VisAreaSize, and restores it upon next open. This, however, leads to different content window sizes when the window is closed with another toolbar set than used during opening. This patch here prevents those different content window sizes. Also, now the content window size doesn't change when, explicitly or implicitly, a toolbar is shown or hidden. Instead, the content window size stays the same, and the container window size is adjusted. 2009-10-15 09:32:41 +0000 fs r276931 : during #i105259#: UNO access to more attributes of top windows 2009-10-15 09:30:28 +0000 fs r276930 : indention corrected (better readable) 2009-10-15 09:26:46 +0000 fs r276929 : during #i105259#: access to more attributes of top windows 2009-10-14 10:04:39 +0000 fs r276889 : connecting via services manager, not naming service 2009-10-12 11:31:08 +0000 fs r276831 : during #i105806# FillPropertySet: do not attempt to set *AutoStyleName if it doesn't exist 2009-10-12 11:24:44 +0000 fs r276830 : #i105806# getPropertyValue: throw an UnknownPropertyException for, well, unknown properties 2009-10-08 08:20:58 +0000 fs r276774 : implSubmit: re-throw WrappedTargetExceptions unmodified 2009-10-07 19:19:42 +0000 fs r276770 : #i105198# do not pass an CommandType if we do not have a command 2009-10-07 17:39:36 +0000 fs r276768 : export the OWeakObject::disposeWeakConnectionPoint symbol 2009-10-07 12:59:17 +0000 fs r276754 : #i87693# 2009-10-07 11:19:22 +0000 fs r276752 : #i10000# 2009-10-07 10:21:08 +0000 fs r276748 : #105482# do not require a controller, at least not in *all* circumstances (executed reports have a model, the ReportDefinition, but no Controller) 2009-10-07 10:04:08 +0000 fs r276747 : copying the changes from CWS fwk121 herein, in particular the fix for issue #i105371# 2009-10-07 09:58:30 +0000 fs r276746 : copying the changes from CWS fwk121 herein, in particular the fix for issue #i105371# 2009-10-07 09:48:14 +0000 fs r276744 : removed (now) pointless assertion 2009-10-07 06:59:19 +0000 fs r276740 : export the OWeakObject::disposeWeakConnectionPoint symbol 2009-10-07 06:44:43 +0000 fs r276739 : OComponentHelper::release & WeakAggComponentImplHelperBase::release: when our ref count drops to 0, call OWeakObject's disposeWeakConnectionPoint before (temporarily) incrementing the ref count, again. This ensures that our adapter cannot create references to the dying object anymore. (A complex test case in dbaccess (#i105505#) triggered such a situation, but in another class using an analogous release/dispose/destroy pattern, namely WeakComponentImplHelperBase) 2009-10-07 06:37:20 +0000 fs r276738 : found during some new complex test cases: call disposeWeakConnectionPoint before actually starting to destroy the object, this ensures no other threads will resurrect it while it is dying 2009-10-06 21:58:24 +0000 fs r276734 : oops, two small corrections to the previous fix (hey, complex test cases are cool) 2009-10-06 21:51:16 +0000 fs r276733 : log the name of the data source which cannot be revoked 2009-10-06 21:50:41 +0000 fs r276732 : more detailed error message when cleanup fails 2009-10-06 21:50:01 +0000 fs r276731 : reworked the ModelImpl caching. The new and improved UNO API test for css.sdb.RowSet revealed some inconsistencies, in whether the objects are cached by their URL, or by their registration name. This has been changed to caching by registration name. 2009-10-06 13:50:34 +0000 fs r276714 : print diagnostics when we cannot clean up the test case 2009-10-06 13:45:02 +0000 fs r276713 : this test failed all the time, since the core (rightfully) threw an exception. Disabled it for the moment, until issue 84253 is fixed 2009-10-06 12:52:46 +0000 fs r276711 : rewrote this test. Now we do not re-use the same .odb across different test cases, as this leads to unreliable (timing-dependent) results/failures. Instead, every test sets up a new odb file. Also, did some re-factoring, improved the cleanup code, and caught a few more errors. 2009-10-06 12:51:07 +0000 fs r276710 : DBTools taking a logger now 2009-10-06 12:50:42 +0000 fs r276709 : taking a PrintWriter for logging purpose 2009-10-06 12:50:03 +0000 fs r276708 : DBTools taking a logger now 2009-10-06 12:49:22 +0000 fs r276707 : typo 2009-10-06 12:49:03 +0000 fs r276706 : typo 2009-10-06 12:48:52 +0000 fs r276705 : wrappers around some database-related services - initial versions only, to evolve over time, and intended to finally replace the DBTools class 2009-10-06 12:48:02 +0000 fs r276704 : typo 2009-10-06 12:38:42 +0000 fs r276702 : some better diagnostics, done during getting the API tests to work more reliably 2009-10-06 10:35:51 +0000 fs r276698 : when living in, e.g., the DataSourceBrowser, we can't expect to find an XModifiable2, so don't assert its existence 2009-10-05 12:47:52 +0000 oj r276677 : #i105607# check for read moved into if scope 2009-10-05 11:37:06 +0000 fs r276676 : when saving a file fails, retrieve the error message from the InteractionRequestStringResolver - this is better than any generic message we can create 2009-10-05 10:04:23 +0000 oj r276673 : #i105607# check for read moved into if scope 2009-10-05 09:46:17 +0000 fs r276671 : #i10000# 2009-10-05 08:43:58 +0000 fs r276664 : #i105505# release: dispose the (base classes) weak connection point before disposing ourself, and in particular before temporarily incrementing our ref count, again. This way, we prevent that a separate thread re-surrects us (using the weak connection point's queryAdapted) while we're in the process of destruction 2009-10-05 08:41:49 +0000 fs r276663 : #i105505# +disposeWeakConnectionPoint (outsourced into dedicated method from ::release) 2009-10-05 08:40:26 +0000 fs r276662 : no need to derived from OSubComponent, its features are not used, directly derive from WeakComponentImplFoo instead 2009-10-05 08:39:38 +0000 fs r276661 : #i105505# diagnostics 2009-10-05 08:39:16 +0000 fs r276660 : #i105505# +testDocumentRevenants 2009-10-05 08:36:01 +0000 fs r276659 : #i105560# reverted the removal of GenericController::openHelpAgent - this is needed in module reportdesign 2009-10-04 19:53:30 +0000 fs r276657 : #105560# remove unused code thanks to cmc@openoffice.org for submitting the patch 2009-10-04 19:50:28 +0000 fs r276656 : #i105550# remove unused 'fire' method (thanks to cmc) 2009-10-03 16:13:15 +0000 fs r276655 : CWS-TOOLING: rebase CWS dba33a to trunk@276429 (milestone: DEV300:m60) 2009-10-02 19:20:48 +0000 fs r276651 : #i104117# lotta changed IDs ... 2009-10-02 10:52:24 +0000 fs r276634 : #i105505# If a model is created, and is a revenant of a previous incarnation, then ensure it is properly initialized. In particular, in its ctor, set the state to "Initializing", not "Initialized", and then let the ModelImpl call attachResource. This ensures that the model is initialized completely, including firing the necessary events. 2009-10-02 10:51:08 +0000 fs r276633 : #i105505# always do an attachResource at the newly loaded model, even if it (internally) was not really loaded, but only a revenant of a previous incarnation of this document 2009-10-01 11:10:13 +0000 fs r276597 : do not rely on the name 'Standard' for the one and only form in a document 2009-10-01 10:36:29 +0000 fs r276590 : #i105509# don't rely on default form component names, use indexes 2009-10-01 09:12:20 +0000 fs r276582 : #i105505# 2009-09-30 07:55:21 +0000 fs r276542 : removed some unsed methods / spared some unnecessary pixel<->logic conversion 2009-09-30 07:53:22 +0000 fs r276541 : removed unneeded methods 2009-09-30 06:35:59 +0000 fs r276538 : #i10000# 2009-09-29 13:45:02 +0000 fs r276531 : refactored the Roadmap* classes, to be able to fix above-mentioned #i105113# 2009-09-29 10:27:10 +0000 fs r276520 : #i105367# 2009-09-29 08:46:45 +0000 fs r276510 : #i104956# cleaned up the makefiles 2009-09-28 21:00:07 +0000 fs r276505 : #i104117# sourced those IDs out from extension.hrc 2009-09-28 20:59:05 +0000 fs r276504 : no need to let one FREE... 2009-09-28 20:53:36 +0000 fs r276503 : #i104117# cleaned up the mess with help IDs in module extensions. Formerly, extensions used to use help IDs which were declared in module svx, and vice versa. Also, help ID ranges were not respected. 2009-09-28 11:25:36 +0000 fs r276489 : typo 2009-09-28 11:25:10 +0000 fs r276488 : #i105235# 2009-09-24 11:53:16 +0000 fs r276423 : #i105234# do not zoom the control when they view information is still uninitialized (happens at least in Writer when opening a form document) 2009-09-24 09:42:28 +0000 fs r276415 : #i105234# proper zoom handling for the nav bar 2009-09-24 09:42:19 +0000 fs r276414 : #i105234# setZoom: care for precision errors caused by implicit conversion float->double 2009-09-16 11:11:43 +0000 fs r276195 : #i105082# consolidated the sub storage handling, by delegating more functionality into the DocumentStorageAccess class. As a result, there won't be that many unnecessary commits anymore. Also, the two different storage caches (in ModelImpl::m_aStorages and DocumentStorageAccess::m_aExposedStorages) have been consolidated. This is not really part of the fix of issue 105082, but it helped reducing the calls to the storage/package implementation. 2009-09-15 21:42:27 +0000 fs r276190 : don't calculate space for BOLD if the text is not really bold (speeds up rendering for large tree structures) 2009-09-15 20:20:23 +0000 fs r276188 : getTypeInfo: fill m_aTypeInfoRows only if really all type infos could be retrieved 2009-09-15 20:19:29 +0000 fs r276187 : do not continue loading when the controller initialization throws an error 2009-09-14 12:25:57 +0000 fs r276119 : oops, this patch was not intended for this CWS 2009-09-14 12:13:57 +0000 fs r276114 : #cr6875455# introduce a ReferenceDevice property for various control models 2009-09-14 10:33:02 +0000 fs r276106 : removed dead file 2009-09-09 08:37:31 +0000 fs r275972 : remove OSL_TRACE in VCLXButton dtor 2009-09-08 11:19:17 +0000 oj r275926 : i76534# remove mnemonic from fixed text 2009-09-07 08:39:37 +0000 fs r275874 : create CWS dba33a from cws/dba32g@275857 (CWS: dba32g)
Diffstat (limited to 'framework')
-rw-r--r--framework/inc/macros/registration.hxx6
-rw-r--r--framework/inc/properties.h17
-rw-r--r--framework/inc/services.h1
-rw-r--r--framework/inc/services/layoutmanager.hxx38
-rw-r--r--framework/source/layoutmanager/layoutmanager.cxx302
-rw-r--r--framework/source/layoutmanager/makefile.mk2
-rw-r--r--framework/source/register/makefile.mk2
-rw-r--r--framework/source/xml/menuconfiguration.cxx4
8 files changed, 178 insertions, 194 deletions
diff --git a/framework/inc/macros/registration.hxx b/framework/inc/macros/registration.hxx
index 7a48fad1f84c..d026c1b0f04c 100644
--- a/framework/inc/macros/registration.hxx
+++ b/framework/inc/macros/registration.hxx
@@ -139,7 +139,7 @@ ________________________________________________________________________________
// define helper to get information about service environment
//*****************************************************************************************************************
#define COMPONENTGETIMPLEMENTATIONENVIRONMENT \
- extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char** ppEnvironmentTypeName , \
+ extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char** ppEnvironmentTypeName , \
uno_Environment** ) \
{ \
*ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ; \
@@ -150,7 +150,7 @@ ________________________________________________________________________________
// define registration of service
//*****************************************************************************************************************
#define COMPONENTWRITEINFO( INFOS ) \
- extern "C" sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/ , \
+ extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/ , \
void* pRegistryKey ) \
{ \
LOG_REGISTRATION_WRITEINFO( "\t[start]\n" ) \
@@ -185,7 +185,7 @@ ________________________________________________________________________________
// define method to instanciate new services
//*****************************************************************************************************************
#define COMPONENTGETFACTORY( IFFACTORIES ) \
- extern "C" void* SAL_CALL component_getFactory( const sal_Char* pImplementationName , \
+ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName , \
void* pServiceManager , \
void* /*pRegistryKey*/ ) \
{ \
diff --git a/framework/inc/properties.h b/framework/inc/properties.h
index d09fde5a5fc4..d2619cd9ee87 100644
--- a/framework/inc/properties.h
+++ b/framework/inc/properties.h
@@ -193,25 +193,26 @@ namespace framework{
//_______________________________________________
/** properties for "LayoutManager" class */
-#define LAYOUTMANAGER_PROPNAME_ASCII_MENUBARCLOSER "MenuBarCloser"
-#define LAYOUTMANAGER_PROPNAME_ASCII_AUTOMATICTOOLBARS "AutomaticToolbars"
-#define LAYOUTMANAGER_PROPNAME_ASCII_REFRESHVISIBILITY "RefreshContextToolbarVisibility"
-#define LAYOUTMANAGER_PROPNAME_ASCII_HIDECURRENTUI "HideCurrentUI"
-#define LAYOUTMANAGER_PROPNAME_ASCII_LOCKCOUNT "LockCount"
+#define LAYOUTMANAGER_PROPNAME_ASCII_MENUBARCLOSER "MenuBarCloser"
+#define LAYOUTMANAGER_PROPNAME_ASCII_AUTOMATICTOOLBARS "AutomaticToolbars"
+#define LAYOUTMANAGER_PROPNAME_ASCII_REFRESHVISIBILITY "RefreshContextToolbarVisibility"
+#define LAYOUTMANAGER_PROPNAME_ASCII_HIDECURRENTUI "HideCurrentUI"
+#define LAYOUTMANAGER_PROPNAME_ASCII_LOCKCOUNT "LockCount"
+#define LAYOUTMANAGER_PROPNAME_ASCII_PRESERVE_CONTENT_SIZE "PreserveContentSize"
#define LAYOUTMANAGER_PROPNAME_MENUBARCLOSER ::rtl::OUString::createFromAscii( LAYOUTMANAGER_PROPNAME_ASCII_MENUBARCLOSER )
#define LAYOUTMANAGER_PROPNAME_AUTOMATICTOOLBARS ::rtl::OUString::createFromAscii( LAYOUTMANAGER_PROPNAME_ASCII_AUTOMATICTOOLBARS )
#define LAYOUTMANAGER_PROPNAME_REFRESHVISIBILITY ::rtl::OUString::createFromAscii( LAYOUTMANAGER_PROPNAME_ASCII_REFRESHVISIBILITY )
#define LAYOUTMANAGER_PROPNAME_HIDECURRENTUI ::rtl::OUString::createFromAscii( LAYOUTMANAGER_PROPNAME_ASCII_HIDECURRENTUI )
#define LAYOUTMANAGER_PROPNAME_LOCKCOUNT ::rtl::OUString::createFromAscii( LAYOUTMANAGER_PROPNAME_ASCII_LOCKCOUNT )
+#define LAYOUTMANAGER_PROPNAME_PRESERVE_CONTENT_SIZE ::rtl::OUString::createFromAscii( LAYOUTMANAGER_PROPNAME_ASCII_PRESERVE_CONTENT_SIZE )
#define LAYOUTMANAGER_PROPHANDLE_MENUBARCLOSER 0
#define LAYOUTMANAGER_PROPHANDLE_AUTOMATICTOOLBARS 1
#define LAYOUTMANAGER_PROPHANDLE_REFRESHVISIBILITY 2
#define LAYOUTMANAGER_PROPHANDLE_HIDECURRENTUI 3
#define LAYOUTMANAGER_PROPHANDLE_LOCKCOUNT 4
-
-#define LAYOUTMANAGER_PROPCOUNT 5
+#define LAYOUTMANAGER_PROPHANDLE_PRESERVE_CONTENT_SIZE 5
//_______________________________________________
/** properties for "UICommandDescription" class */
@@ -271,7 +272,7 @@ namespace framework{
#define TABWINDOWSERVICE_PROPNAME_WINDOW ::rtl::OUString::createFromAscii( TABWINDOWSERVICE_PROPNAME_ASCII_WINDOW )
#define TABWINDOWSERVICE_PROPHANDLE_WINDOW 0
-#define TABWINDOWSERVICE_PROPCOUNT 1
+#define TABWINDOWSERVICE_PROPCOUNT 1
//_______________________________________________
/** properties of tabreg service */
diff --git a/framework/inc/services.h b/framework/inc/services.h
index e9f3e1bfe3ce..70f4f8fde9a2 100644
--- a/framework/inc/services.h
+++ b/framework/inc/services.h
@@ -127,6 +127,7 @@ namespace framework{
#define SERVICENAME_IMAGEMANAGER DECLARE_ASCII("com.sun.star.ui.ImageManager" )
#define SERVICENAME_TABWINDOWSERVICE DECLARE_ASCII("com.sun.star.ui.dialogs.TabContainerWindow" )
#define SERVICENAME_WINDOWCONTENTFACTORYMANAGER DECLARE_ASCII("com.sun.star.ui.WindowContentFactoryManager" )
+#define SERVICENAME_DISPLAYACCESS DECLARE_ASCII("com.sun.star.awt.DisplayAccess" )
//_________________________________________________________________________________________________________________
// used implementationnames by framework
diff --git a/framework/inc/services/layoutmanager.hxx b/framework/inc/services/layoutmanager.hxx
index 86dec1a938bf..8c412e5d6237 100644
--- a/framework/inc/services/layoutmanager.hxx
+++ b/framework/inc/services/layoutmanager.hxx
@@ -69,6 +69,7 @@
#include <com/sun/star/ui/XUIElementFactory.hpp>
#include <com/sun/star/frame/XInplaceLayout.hpp>
#include <com/sun/star/ui/DockingArea.hpp>
+#include <com/sun/star/awt/XTopWindow2.hpp>
#include <com/sun/star/awt/XDockableWindow.hpp>
#include <com/sun/star/awt/XDockableWindowListener.hpp>
#include <com/sun/star/frame/XMenuBarMergingAcceptor.hpp>
@@ -78,8 +79,9 @@
// other includes
//_________________________________________________________________________________________________________________
#include <cppuhelper/propshlp.hxx>
+#include <cppuhelper/implbase9.hxx>
#include <cppuhelper/interfacecontainer.hxx>
-#include <cppuhelper/weak.hxx>
+#include <comphelper/propertycontainer.hxx>
#include <vcl/wintypes.hxx>
#include <svtools/miscopt.hxx>
#include <vcl/toolbox.hxx>
@@ -89,22 +91,23 @@ class MenuBar;
namespace framework
{
class GlobalSettings;
- class LayoutManager : public css::lang::XTypeProvider ,
- public css::lang::XServiceInfo ,
- public ::com::sun::star::frame::XLayoutManager ,
- public css::awt::XWindowListener ,
- public css::frame::XFrameActionListener ,
- public ::com::sun::star::ui::XUIConfigurationListener ,
- public ::com::sun::star::frame::XInplaceLayout ,
- public css::awt::XDockableWindowListener ,
- public ::com::sun::star::frame::XMenuBarMergingAcceptor,
- public css::frame::XLayoutManagerEventBroadcaster ,
+ typedef ::cppu::WeakImplHelper9 < ::com::sun::star::lang::XServiceInfo
+ , ::com::sun::star::frame::XLayoutManager
+ , ::com::sun::star::awt::XWindowListener
+ , ::com::sun::star::frame::XFrameActionListener
+ , ::com::sun::star::ui::XUIConfigurationListener
+ , ::com::sun::star::frame::XInplaceLayout
+ , ::com::sun::star::awt::XDockableWindowListener
+ , ::com::sun::star::frame::XMenuBarMergingAcceptor
+ , ::com::sun::star::frame::XLayoutManagerEventBroadcaster
+ > LayoutManager_Base;
+ typedef ::comphelper::OPropertyContainer LayoutManager_PBase;
+ class LayoutManager : public LayoutManager_Base ,
// base classes
// Order is neccessary for right initialization!
private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
public ::cppu::OBroadcastHelper ,
- public ::cppu::OPropertySetHelper , // => XPropertySet / XFastPropertySet / XMultiPropertySet
- public ::cppu::OWeakObject // => XWeak, XInterface
+ public LayoutManager_PBase
{
public:
enum { DOCKINGAREAS_COUNT = 4 };
@@ -388,6 +391,7 @@ namespace framework
// layouting methods
sal_Bool implts_compareRectangles( const ::com::sun::star::awt::Rectangle& rRect1, const ::com::sun::star::awt::Rectangle& rRect2 );
+ sal_Bool implts_resizeContainerWindow( const ::com::sun::star::awt::Size& rContainerSize, const ::com::sun::star::awt::Point& rComponentPos );
::Size implts_getTopBottomDockingAreaSizes();
::Size implts_getContainerWindowOutputSize();
::com::sun::star::awt::Rectangle implts_getDockingAreaWindowSizes();
@@ -399,7 +403,8 @@ namespace framework
void implts_findNextDockingPos( ::com::sun::star::ui::DockingArea DockingArea, const ::Size& aUIElementSize, ::Point& rVirtualPos, ::Point& rPixelPos );
::com::sun::star::awt::Rectangle implts_calcDockingAreaSizes();
void implts_setDockingAreaWindowSizes( const com::sun::star::awt::Rectangle& rBorderSpace );
- sal_Bool implts_doLayout( sal_Bool bForceRequestBorderSpace );
+ sal_Bool implts_doLayout( sal_Bool bForceRequestBorderSpace, sal_Bool bOuterResize );
+ void implts_doLayout_notify( sal_Bool bOuterResize );
// internal methods to control status/progress bar
::Size implts_getStatusBarSize();
@@ -449,15 +454,15 @@ namespace framework
virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
virtual ::com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw (::com::sun::star::uno::RuntimeException);
- static const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > impl_getStaticPropertyDescriptor();
-
css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR; /** reference to factory, which has created this instance. */
css::uno::Reference< css::util::XURLTransformer > m_xURLTransformer;
+ css::uno::Reference< css::container::XIndexAccess > m_xDisplayAccess;
css::uno::Reference< css::frame::XFrame > m_xFrame;
css::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager > m_xModuleCfgMgr;
css::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager > m_xDocCfgMgr;
css::uno::WeakReference< css::frame::XModel > m_xModel;
css::uno::Reference< css::awt::XWindow > m_xContainerWindow;
+ css::uno::Reference< css::awt::XTopWindow2 > m_xContainerTopWindow;
css::uno::Reference< css::awt::XWindow > m_xDockAreaWindows[DOCKINGAREAS_COUNT];
sal_Int32 m_nLockCount;
UIElementVector m_aUIElements;
@@ -474,6 +479,7 @@ namespace framework
bool m_bStoreWindowState;
bool m_bHideCurrentUI;
bool m_bGlobalSettings;
+ bool m_bPreserveContentSize;
DockingOperation m_eDockOperation;
UIElement m_aDockUIElement;
css::awt::Rectangle m_aDockingArea;
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index fb10e4fae24c..491738dea73f 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -67,17 +67,13 @@
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/awt/XTopWindow.hpp>
#include <com/sun/star/awt/XSystemDependentMenuPeer.hpp>
-#ifndef _COM_SUN_STAR_LANG_XYSTEMDEPENDENT_HPP_
#include <com/sun/star/lang/SystemDependent.hpp>
-#endif
#include <com/sun/star/awt/VclWindowPeerAttribute.hpp>
#include <com/sun/star/awt/PosSize.hpp>
#include <com/sun/star/awt/XDevice.hpp>
#include <com/sun/star/awt/XSystemDependentWindowPeer.hpp>
#include <com/sun/star/awt/XTopWindow.hpp>
-#ifndef _COM_SUN_STAR_UI_XMODULEUICONFIGURATIONMANAGER_HPP_
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
-#endif
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/UIElementType.hpp>
#include <com/sun/star/container/XNameReplace.hpp>
@@ -92,18 +88,18 @@
// other includes
//_________________________________________________________________________________________________________________
#include <svtools/imgdef.hxx>
+#include <tools/diagnose_ex.h>
#include <vcl/window.hxx>
#include <vcl/wrkwin.hxx>
#include <vcl/dockingarea.hxx>
#include <vcl/svapp.hxx>
#include <vcl/i18nhelp.hxx>
#include <vcl/wall.hxx>
-#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
#include <toolkit/unohlp.hxx>
-#endif
#include <toolkit/awt/vclxwindow.hxx>
#include <toolkit/awt/vclxmenu.hxx>
#include <comphelper/mediadescriptor.hxx>
+#include <comphelper/uno3.hxx>
#include <rtl/logfile.hxx>
#include <svtools/cmdoptions.hxx>
@@ -354,40 +350,8 @@ static void impl_setDockingWindowVisibility( const css::uno::Reference< css::lan
//*****************************************************************************************************************
// XInterface, XTypeProvider, XServiceInfo
//*****************************************************************************************************************
-DEFINE_XINTERFACE_14 ( LayoutManager ,
- OWeakObject ,
- DIRECT_INTERFACE( css::lang::XTypeProvider ),
- DIRECT_INTERFACE( css::lang::XServiceInfo ),
- DIRECT_INTERFACE( ::com::sun::star::frame::XLayoutManager ),
- DIRECT_INTERFACE( css::awt::XWindowListener ),
- DIRECT_INTERFACE( css::frame::XFrameActionListener ),
- DIRECT_INTERFACE( ::com::sun::star::ui::XUIConfigurationListener ),
- DIRECT_INTERFACE( ::com::sun::star::frame::XInplaceLayout ),
- DIRECT_INTERFACE( css::awt::XDockableWindowListener ),
- DIRECT_INTERFACE( ::com::sun::star::frame::XMenuBarMergingAcceptor ),
- DIRECT_INTERFACE( css::frame::XLayoutManagerEventBroadcaster ),
- DERIVED_INTERFACE( css::lang::XEventListener, css::frame::XFrameActionListener ),
- DIRECT_INTERFACE( ::com::sun::star::beans::XMultiPropertySet ),
- DIRECT_INTERFACE( ::com::sun::star::beans::XFastPropertySet ),
- DIRECT_INTERFACE( ::com::sun::star::beans::XPropertySet )
- )
-
-DEFINE_XTYPEPROVIDER_14 ( LayoutManager ,
- css::lang::XTypeProvider ,
- css::lang::XServiceInfo ,
- ::com::sun::star::frame::XLayoutManager ,
- css::awt::XWindowListener ,
- css::frame::XFrameActionListener ,
- css::lang::XEventListener ,
- ::com::sun::star::ui::XUIConfigurationListener ,
- ::com::sun::star::frame::XInplaceLayout ,
- css::awt::XDockableWindowListener ,
- ::com::sun::star::frame::XMenuBarMergingAcceptor ,
- css::frame::XLayoutManagerEventBroadcaster ,
- ::com::sun::star::beans::XMultiPropertySet ,
- ::com::sun::star::beans::XFastPropertySet ,
- ::com::sun::star::beans::XPropertySet
- )
+IMPLEMENT_FORWARD_XTYPEPROVIDER2( LayoutManager, LayoutManager_Base, LayoutManager_PBase )
+IMPLEMENT_FORWARD_XINTERFACE2( LayoutManager, LayoutManager_Base, LayoutManager_PBase )
DEFINE_XSERVICEINFO_MULTISERVICE ( LayoutManager ,
::cppu::OWeakObject ,
@@ -398,15 +362,14 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( LayoutManager
DEFINE_INIT_SERVICE ( LayoutManager, {} )
-LayoutManager::LayoutManager( const Reference< XMultiServiceFactory >& xServiceManager ) :
- ThreadHelpBase( &Application::GetSolarMutex() )
+LayoutManager::LayoutManager( const Reference< XMultiServiceFactory >& xServiceManager )
+ : LayoutManager_Base ( )
+ , ThreadHelpBase ( &Application::GetSolarMutex() )
, ::cppu::OBroadcastHelperVar< ::cppu::OMultiTypeInterfaceContainerHelper, ::cppu::OMultiTypeInterfaceContainerHelper::keyType >( m_aLock.getShareableOslMutex() )
- , ::cppu::OPropertySetHelper ( *(static_cast< ::cppu::OBroadcastHelper* >(this)) )
- , ::cppu::OWeakObject ( )
+ , LayoutManager_PBase ( *(static_cast< ::cppu::OBroadcastHelper* >(this)) )
, m_xSMGR( xServiceManager )
- , m_xURLTransformer( Reference< XURLTransformer >( xServiceManager->createInstance(
- SERVICENAME_URLTRANSFORMER),
- UNO_QUERY ))
+ , m_xURLTransformer( xServiceManager->createInstance( SERVICENAME_URLTRANSFORMER ), UNO_QUERY )
+ , m_xDisplayAccess( xServiceManager->createInstance( SERVICENAME_DISPLAYACCESS ), UNO_QUERY )
, m_nLockCount( 0 )
, m_bActive( sal_False )
, m_bInplaceMenuSet( sal_False )
@@ -421,6 +384,7 @@ LayoutManager::LayoutManager( const Reference< XMultiServiceFactory >& xServiceM
, m_bStoreWindowState( sal_False )
, m_bHideCurrentUI( false )
, m_bGlobalSettings( sal_False )
+ , m_bPreserveContentSize( false )
, m_eDockOperation( DOCKOP_ON_COLROW )
, m_pInplaceMenuBar( NULL )
, m_xModuleManager( Reference< XModuleManager >(
@@ -462,6 +426,15 @@ LayoutManager::LayoutManager( const Reference< XMultiServiceFactory >& xServiceM
m_aAsyncLayoutTimer.SetTimeout( 50 );
m_aAsyncLayoutTimer.SetTimeoutHdl( LINK( this, LayoutManager, AsyncLayoutHdl ) );
+
+
+ registerProperty( LAYOUTMANAGER_PROPNAME_AUTOMATICTOOLBARS, LAYOUTMANAGER_PROPHANDLE_AUTOMATICTOOLBARS, css::beans::PropertyAttribute::TRANSIENT, &m_bAutomaticToolbars, ::getCppuType( &m_bAutomaticToolbars ) );
+ registerProperty( LAYOUTMANAGER_PROPNAME_HIDECURRENTUI, LAYOUTMANAGER_PROPHANDLE_HIDECURRENTUI, css::beans::PropertyAttribute::TRANSIENT, &m_bHideCurrentUI, ::getCppuType( &m_bHideCurrentUI ) );
+ registerProperty( LAYOUTMANAGER_PROPNAME_LOCKCOUNT, LAYOUTMANAGER_PROPHANDLE_LOCKCOUNT, css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY, &m_nLockCount, getCppuType( &m_nLockCount ) );
+ registerProperty( LAYOUTMANAGER_PROPNAME_MENUBARCLOSER, LAYOUTMANAGER_PROPHANDLE_MENUBARCLOSER, css::beans::PropertyAttribute::TRANSIENT, &m_bMenuBarCloser, ::getCppuType( &m_bMenuBarCloser ) );
+ const sal_Bool bRefreshVisibility = sal_False;
+ registerPropertyNoMember( LAYOUTMANAGER_PROPNAME_REFRESHVISIBILITY, LAYOUTMANAGER_PROPHANDLE_REFRESHVISIBILITY, css::beans::PropertyAttribute::TRANSIENT, ::getCppuType( &bRefreshVisibility ), &bRefreshVisibility );
+ registerProperty( LAYOUTMANAGER_PROPNAME_PRESERVE_CONTENT_SIZE, LAYOUTMANAGER_PROPHANDLE_PRESERVE_CONTENT_SIZE, css::beans::PropertyAttribute::TRANSIENT, &m_bPreserveContentSize, ::getCppuType( &m_bPreserveContentSize ) );
}
LayoutManager::~LayoutManager()
@@ -3240,7 +3213,7 @@ void LayoutManager::implts_updateUIElementsVisibleState( sal_Bool bSetVisible )
if ( bSetVisible )
{
implts_createNonContextSensitiveToolBars();
- doLayout();
+ implts_doLayout_notify( sal_False );
}
else
{
@@ -3516,7 +3489,7 @@ sal_Bool LayoutManager::implts_showProgressBar()
if ( !pWindow->IsVisible() )
{
pWindow->Show();
- doLayout();
+ implts_doLayout_notify( sal_False );
}
return sal_True;
}
@@ -3557,7 +3530,7 @@ sal_Bool LayoutManager::implts_hideProgressBar()
( bHideStatusBar || bInternalStatusBar ))
{
pWindow->Hide();
- doLayout();
+ implts_doLayout_notify( sal_False );
return sal_True;
}
@@ -3829,6 +3802,7 @@ throw ( RuntimeException )
{
m_aDockingArea = css::awt::Rectangle();
m_xContainerWindow = m_xDockingAreaAcceptor->getContainerWindow();
+ m_xContainerTopWindow.set( m_xContainerWindow, UNO_QUERY );
m_xContainerWindow->addWindowListener( Reference< css::awt::XWindowListener >( static_cast< OWeakObject* >( this ), UNO_QUERY ));
// we always must keep a connection to the window of our frame for resize events
@@ -3913,7 +3887,7 @@ throw ( RuntimeException )
implts_createNonContextSensitiveToolBars();
}
implts_sortUIElements();
- implts_doLayout( sal_True );
+ implts_doLayout( sal_True, sal_False );
}
}
@@ -5477,26 +5451,33 @@ throw (RuntimeException)
implts_notifyListeners( css::frame::LayoutManagerEvents::UNLOCK, a );
if ( bDoLayout )
- doLayout();
+ implts_doLayout_notify( sal_True );
}
void SAL_CALL LayoutManager::doLayout()
throw (RuntimeException)
{
- sal_Bool bLayouted = implts_doLayout( sal_False );
+ implts_doLayout_notify( sal_True );
+}
+void LayoutManager::implts_doLayout_notify( sal_Bool bOuterResize )
+{
+ sal_Bool bLayouted = implts_doLayout( sal_False, bOuterResize );
if ( bLayouted )
implts_notifyListeners( css::frame::LayoutManagerEvents::LAYOUT, Any() );
}
-sal_Bool LayoutManager::implts_doLayout( sal_Bool bForceRequestBorderSpace )
+sal_Bool LayoutManager::implts_doLayout( sal_Bool bForceRequestBorderSpace, sal_Bool bOuterResize )
{
RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::implts_doLayout" );
sal_Bool bNoLock( sal_False );
css::awt::Rectangle aCurrBorderSpace;
Reference< css::awt::XWindow > xContainerWindow;
+ Reference< css::awt::XTopWindow2 > xContainerTopWindow;
+ Reference< css::awt::XWindow > xComponentWindow;
Reference< XDockingAreaAcceptor > xDockingAreaAcceptor;
+ bool bPreserveContentSize( false );
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
ReadGuard aReadLock( m_aLock );
@@ -5507,8 +5488,11 @@ sal_Bool LayoutManager::implts_doLayout( sal_Bool bForceRequestBorderSpace )
bNoLock = ( m_nLockCount == 0 );
xContainerWindow = m_xContainerWindow;
+ xContainerTopWindow = m_xContainerTopWindow;
+ xComponentWindow = m_xFrame->getComponentWindow();
xDockingAreaAcceptor = m_xDockingAreaAcceptor;
aCurrBorderSpace = m_aDockingArea;
+ bPreserveContentSize = m_bPreserveContentSize;
aReadLock.unlock();
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
@@ -5516,7 +5500,8 @@ sal_Bool LayoutManager::implts_doLayout( sal_Bool bForceRequestBorderSpace )
if ( bNoLock &&
xDockingAreaAcceptor.is() &&
- xContainerWindow.is() )
+ xContainerWindow.is() &&
+ xComponentWindow.is() )
{
bLayouted = sal_True;
@@ -5532,11 +5517,44 @@ sal_Bool LayoutManager::implts_doLayout( sal_Bool bForceRequestBorderSpace )
if ( !bEqual || bForceRequestBorderSpace || bMustDoLayout )
{
- bGotRequestedBorderSpace = xDockingAreaAcceptor->requestDockingAreaSpace( aBorderSpace );
- if ( bGotRequestedBorderSpace )
+ // we always resize the content window (instead of the complete container window) if we're not set up
+ // to (attempt to) preserve the content window's size
+ if ( bOuterResize && !bPreserveContentSize )
+ bOuterResize = sal_False;
+
+ // maximized windows can resized their content window only, not their container window
+ if ( bOuterResize && xContainerTopWindow.is() && xContainerTopWindow->getIsMaximized() )
+ bOuterResize = sal_False;
+
+ // if the component window does not have a size (yet), then we can't use it to calc the container
+ // window size
+ css::awt::Rectangle aComponentRect = xComponentWindow->getPosSize();
+ if ( bOuterResize && ( aComponentRect.Width == 0 ) && ( aComponentRect.Height == 0 ) )
+ bOuterResize = sal_False;
+
+ bGotRequestedBorderSpace = sal_False;
+ if ( bOuterResize )
{
- xDockingAreaAcceptor->setDockingAreaSpace( aBorderSpace );
+ Reference< awt::XDevice > xDevice( xContainerWindow, uno::UNO_QUERY );
+ awt::DeviceInfo aContainerInfo = xDevice->getInfo();
+ awt::Size aRequestedSize( aComponentRect.Width + aContainerInfo.LeftInset + aContainerInfo.RightInset + aBorderSpace.X + aBorderSpace.Width,
+ aComponentRect.Height + aContainerInfo.TopInset + aContainerInfo.BottomInset + aBorderSpace.Y + aBorderSpace.Height );
+ awt::Point aComponentPos( aBorderSpace.X, aBorderSpace.Y );
+
+ bGotRequestedBorderSpace = implts_resizeContainerWindow( aRequestedSize, aComponentPos );
+ }
+
+ // if we did not do an container window resize, or it failed, then use the DockingAcceptor as usual
+ if ( !bGotRequestedBorderSpace )
+ {
+ bGotRequestedBorderSpace = xDockingAreaAcceptor->requestDockingAreaSpace( aBorderSpace );
+ if ( bGotRequestedBorderSpace )
+ xDockingAreaAcceptor->setDockingAreaSpace( aBorderSpace );
+ }
+
+ if ( bGotRequestedBorderSpace )
+ {
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
aWriteGuard.lock();
m_aDockingArea = aBorderSpace;
@@ -5603,6 +5621,52 @@ sal_Bool LayoutManager::implts_compareRectangles( const css::awt::Rectangle& rRe
( rRect1.Height == rRect2.Height ));
}
+sal_Bool LayoutManager::implts_resizeContainerWindow( const awt::Size& rContainerSize,
+ const awt::Point& rComponentPos )
+{
+ /* SAFE AREA ----------------------------------------------------------------------------------------------- */
+ ReadGuard aReadLock( m_aLock );
+ Reference< awt::XWindow > xContainerWindow = m_xContainerWindow;
+ Reference< awt::XTopWindow2 > xContainerTopWindow = m_xContainerTopWindow;
+ Reference< awt::XWindow > xComponentWindow = m_xFrame->getComponentWindow();
+ Reference< container::XIndexAccess > xDisplayAccess = m_xDisplayAccess;
+ aReadLock.unlock();
+ /* SAFE AREA ----------------------------------------------------------------------------------------------- */
+
+ // calculate the maximum size we have for the container window
+ awt::Rectangle aWorkArea;
+ try
+ {
+ sal_Int32 nDisplay = xContainerTopWindow->getDisplay();
+ Reference< beans::XPropertySet > xDisplayInfo( xDisplayAccess->getByIndex( nDisplay ), UNO_QUERY_THROW );
+ OSL_VERIFY( xDisplayInfo->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "WorkArea" ) ) ) >>= aWorkArea );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+
+ if ( ( aWorkArea.Width > 0 ) && ( aWorkArea.Height > 0 ) )
+ {
+ if ( ( rContainerSize.Width > aWorkArea.Width )
+ || ( rContainerSize.Height > aWorkArea.Height )
+ )
+ return sal_False;
+ // Strictly, this is not correct. If we have a multi-screen display (css.awt.DisplayAccess.MultiDisplay == true),
+ // the the "effective work area" would be much larger than the work area of a single display, since we could in theory
+ // position the container window across multiple screens.
+ // However, this should suffice as a heuristics here ... (nobody really wants to check whethere the different screens are
+ // stacked horizontally or vertically, whether their work areas can really be combined, or are separated by non-work-areas,
+ // and the like ... right?)
+ }
+
+ // resize our container window
+ xContainerWindow->setPosSize( 0, 0, rContainerSize.Width, rContainerSize.Height, css::awt::PosSize::SIZE );
+ // position the component window
+ xComponentWindow->setPosSize( rComponentPos.X, rComponentPos.Y, 0, 0, css::awt::PosSize::POS );
+ return sal_True;
+}
+
void SAL_CALL LayoutManager::setVisible( sal_Bool bVisible )
throw (::com::sun::star::uno::RuntimeException)
{
@@ -7028,7 +7092,7 @@ IMPL_LINK( LayoutManager, AsyncLayoutHdl, Timer *, EMPTYARG )
aReadLock.unlock();
implts_setDockingAreaWindowSizes( aDockingArea );
- implts_doLayout( sal_True );
+ implts_doLayout( sal_True, sal_False );
return 0;
}
@@ -7079,7 +7143,8 @@ throw ( RuntimeException )
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
implts_reset( sal_True );
- implts_doLayout( sal_True );
+ implts_doLayout( sal_True, sal_False );
+ implts_doLayout( sal_True, sal_True );
}
else if (( aEvent.Action == FrameAction_FRAME_UI_ACTIVATED ) ||
( aEvent.Action == FrameAction_FRAME_UI_DEACTIVATING ))
@@ -7106,7 +7171,6 @@ throw ( RuntimeException )
// SAFE AREA -----------------------------------------------------------------------------------------------
implts_reset( sal_False );
-
}
}
@@ -7148,6 +7212,7 @@ throw( RuntimeException )
}
m_xInplaceMenuBar.clear();
m_xContainerWindow.clear();
+ m_xContainerTopWindow.clear();
implts_destroyDockingAreaWindows();
if ( m_xModuleCfgMgr.is() )
@@ -7198,6 +7263,7 @@ throw( RuntimeException )
}
m_xInplaceMenuBar.clear();
m_xContainerWindow.clear();
+ m_xContainerTopWindow.clear();
}
else if ( rEvent.Source == Reference< XInterface >( m_xDocCfgMgr, UNO_QUERY ))
{
@@ -7412,65 +7478,21 @@ sal_Bool SAL_CALL LayoutManager::convertFastPropertyValue( Any& aConverted
sal_Int32 nHandle ,
const Any& aValue ) throw( com::sun::star::lang::IllegalArgumentException )
{
- // Initialize state with FALSE !!!
- // (Handle can be invalid)
- sal_Bool bReturn = sal_False;
-
- switch( nHandle )
- {
- case LAYOUTMANAGER_PROPHANDLE_MENUBARCLOSER :
- bReturn = PropHelper::willPropertyBeChanged(
- com::sun::star::uno::makeAny(m_bMenuBarCloser),
- aValue,
- aOldValue,
- aConvertedValue);
- break;
- case LAYOUTMANAGER_PROPHANDLE_AUTOMATICTOOLBARS:
- bReturn = PropHelper::willPropertyBeChanged(
- com::sun::star::uno::makeAny(m_bAutomaticToolbars),
- aValue,
- aOldValue,
- aConvertedValue);
- break;
- case LAYOUTMANAGER_PROPHANDLE_REFRESHVISIBILITY:
- bReturn = PropHelper::willPropertyBeChanged(
- com::sun::star::uno::makeAny(sal_False),
- aValue,
- aOldValue,
- aConvertedValue);
- break;
- case LAYOUTMANAGER_PROPHANDLE_HIDECURRENTUI:
- bReturn = PropHelper::willPropertyBeChanged(
- com::sun::star::uno::makeAny(m_bHideCurrentUI),
- aValue,
- aOldValue,
- aConvertedValue);
- break;
- }
-
- // Return state of operation.
- return bReturn ;
+ return LayoutManager_PBase::convertFastPropertyValue( aConvertedValue, aOldValue, nHandle, aValue );
}
void SAL_CALL LayoutManager::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle ,
const com::sun::star::uno::Any& aValue ) throw( com::sun::star::uno::Exception )
{
+ if ( nHandle != LAYOUTMANAGER_PROPHANDLE_REFRESHVISIBILITY )
+ LayoutManager_PBase::setFastPropertyValue_NoBroadcast( nHandle, aValue );
+
switch( nHandle )
{
case LAYOUTMANAGER_PROPHANDLE_MENUBARCLOSER:
- {
- sal_Bool bCloserState = sal_False;
- aValue >>= bCloserState;
- implts_setMenuBarCloser( bCloserState );
- break;
- }
- case LAYOUTMANAGER_PROPHANDLE_AUTOMATICTOOLBARS:
- {
- sal_Bool bValue = sal_Bool();
- if ( aValue >>= bValue )
- m_bAutomaticToolbars = bValue;
+ implts_updateMenuBarClose();
break;
- }
+
case LAYOUTMANAGER_PROPHANDLE_REFRESHVISIBILITY:
{
sal_Bool bValue = sal_Bool();
@@ -7478,40 +7500,17 @@ void SAL_CALL LayoutManager::setFastPropertyValue_NoBroadcast( sal_Int32
implts_refreshContextToolbarsVisibility();
break;
}
+
case LAYOUTMANAGER_PROPHANDLE_HIDECURRENTUI:
- {
- sal_Bool bValue = sal_Bool();
- if ( aValue >>= bValue )
- {
- m_bHideCurrentUI = bValue;
- implts_setCurrentUIVisibility( !bValue );
- }
+ implts_setCurrentUIVisibility( !m_bHideCurrentUI );
break;
- }
}
}
void SAL_CALL LayoutManager::getFastPropertyValue( com::sun::star::uno::Any& aValue ,
sal_Int32 nHandle ) const
{
- switch( nHandle )
- {
- case LAYOUTMANAGER_PROPHANDLE_MENUBARCLOSER:
- aValue <<= m_bMenuBarCloser;
- break;
- case LAYOUTMANAGER_PROPHANDLE_AUTOMATICTOOLBARS:
- aValue <<= m_bAutomaticToolbars;
- break;
- case LAYOUTMANAGER_PROPHANDLE_REFRESHVISIBILITY:
- aValue <<= sal_False;
- break;
- case LAYOUTMANAGER_PROPHANDLE_HIDECURRENTUI:
- aValue <<= m_bHideCurrentUI;
- break;
- case LAYOUTMANAGER_PROPHANDLE_LOCKCOUNT:
- aValue <<= m_nLockCount;
- break;
- }
+ LayoutManager_PBase::getFastPropertyValue( aValue, nHandle );
}
::cppu::IPropertyArrayHelper& SAL_CALL LayoutManager::getInfoHelper()
@@ -7530,9 +7529,9 @@ void SAL_CALL LayoutManager::getFastPropertyValue( com::sun::star::uno::Any& aVa
if( pInfoHelper == NULL )
{
// Define static member to give structure of properties to baseclass "OPropertySetHelper".
- // "impl_getStaticPropertyDescriptor" is a non exported and static funtion, who will define a static propertytable.
- // "sal_True" say: Table is sorted by name.
- static ::cppu::OPropertyArrayHelper aInfoHelper( impl_getStaticPropertyDescriptor(), sal_True );
+ uno::Sequence< beans::Property > aProperties;
+ describeProperties( aProperties );
+ static ::cppu::OPropertyArrayHelper aInfoHelper( aProperties, sal_True );
pInfoHelper = &aInfoHelper;
}
}
@@ -7564,28 +7563,5 @@ com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > SAL_CA
return (*pInfo);
}
-const com::sun::star::uno::Sequence< com::sun::star::beans::Property > LayoutManager::impl_getStaticPropertyDescriptor()
-{
- // Create a new static property array to initialize sequence!
- // Table of all predefined properties of this class. Its used from OPropertySetHelper-class!
- // Don't forget to change the defines (see begin of this file), if you add, change or delete a property in this list!!!
- // It's necessary for methods of OPropertySetHelper.
- // ATTENTION:
- // YOU MUST SORT FOLLOW TABLE BY NAME ALPHABETICAL !!!
-
- static const com::sun::star::beans::Property pProperties[] =
- {
- com::sun::star::beans::Property( LAYOUTMANAGER_PROPNAME_AUTOMATICTOOLBARS, LAYOUTMANAGER_PROPHANDLE_AUTOMATICTOOLBARS, ::getCppuType((const sal_Bool*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT ),
- com::sun::star::beans::Property( LAYOUTMANAGER_PROPNAME_HIDECURRENTUI, LAYOUTMANAGER_PROPHANDLE_HIDECURRENTUI, ::getCppuType((const sal_Bool*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT ),
- com::sun::star::beans::Property( LAYOUTMANAGER_PROPNAME_LOCKCOUNT, LAYOUTMANAGER_PROPHANDLE_LOCKCOUNT, ::getCppuType((const sal_Int32*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT|com::sun::star::beans::PropertyAttribute::READONLY ),
- com::sun::star::beans::Property( LAYOUTMANAGER_PROPNAME_MENUBARCLOSER, LAYOUTMANAGER_PROPHANDLE_MENUBARCLOSER, ::getCppuType((const sal_Bool*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT ),
- com::sun::star::beans::Property( LAYOUTMANAGER_PROPNAME_REFRESHVISIBILITY, LAYOUTMANAGER_PROPHANDLE_REFRESHVISIBILITY, ::getCppuType((const sal_Bool*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT )
- };
- // Use it to initialize sequence!
- static const com::sun::star::uno::Sequence< com::sun::star::beans::Property > lPropertyDescriptor( pProperties, LAYOUTMANAGER_PROPCOUNT );
- // Return static "PropertyDescriptor"
- return lPropertyDescriptor;
-}
-
} // namespace framework
diff --git a/framework/source/layoutmanager/makefile.mk b/framework/source/layoutmanager/makefile.mk
index b9b6bcf248ff..3af616971ad7 100644
--- a/framework/source/layoutmanager/makefile.mk
+++ b/framework/source/layoutmanager/makefile.mk
@@ -39,6 +39,8 @@ ENABLE_EXCEPTIONS= TRUE
.INCLUDE : settings.mk
+VISIBILITY_HIDDEN = TRUE
+
# --- Generate -----------------------------------------------------
SLOFILES= \
diff --git a/framework/source/register/makefile.mk b/framework/source/register/makefile.mk
index 1e15c55bd23a..7d7f00e94512 100644
--- a/framework/source/register/makefile.mk
+++ b/framework/source/register/makefile.mk
@@ -40,6 +40,8 @@ LIBTARGET= NO
.INCLUDE : settings.mk
+VISIBILITY_HIDDEN = TRUE
+
# --- Generate -----------------------------------------------------
SLOFILES= \
diff --git a/framework/source/xml/menuconfiguration.cxx b/framework/source/xml/menuconfiguration.cxx
index 7b0520219ef6..dcaf354891f6 100644
--- a/framework/source/xml/menuconfiguration.cxx
+++ b/framework/source/xml/menuconfiguration.cxx
@@ -44,10 +44,6 @@
#include <xml/saxnamespacefilter.hxx>
#include <services.h>
-#ifndef _FRAMEWORK_SERVICES_LAYOUTMANAGER_HXX_
-#include <services/layoutmanager.hxx>
-#endif
-
#ifndef _FRAMEWORK_UIELEMENT_ROOTITEMCONTAINER_HXX_
#include <uielement/rootitemcontainer.hxx>
#endif