diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-11-27 12:39:32 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-11-27 12:39:32 +0000 |
commit | a90d145d75b60b58cff8ca4a202068904a60c213 (patch) | |
tree | 5d9bcdea04331d2c8b5ca1aa2bd7953200b97e31 | |
parent | 229aa1ebdffbf985ccb7af483b41cef9d18ce0e7 (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)
21 files changed, 479 insertions, 578 deletions
diff --git a/connectivity/qa/connectivity/tools/DbaseDatabase.java b/connectivity/qa/connectivity/tools/DbaseDatabase.java index be41dfae39..c97d7804df 100755 --- a/connectivity/qa/connectivity/tools/DbaseDatabase.java +++ b/connectivity/qa/connectivity/tools/DbaseDatabase.java @@ -65,7 +65,8 @@ public class DbaseDatabase extends AbstractDatabase private void createDBDocument() throws Exception { final File documentFile = File.createTempFile("dbase", ".odb"); - documentFile.deleteOnExit(); + if ( documentFile.exists() ) + documentFile.delete(); final File subPath = new File(documentFile.getParent() + File.separator + documentFile.getName().replaceAll(".odb", "") + File.separator ); subPath.mkdir(); //subPath.deleteOnExit(); diff --git a/connectivity/qa/connectivity/tools/HsqlDatabase.java b/connectivity/qa/connectivity/tools/HsqlDatabase.java index b1af0c118e..036edd9a6a 100644 --- a/connectivity/qa/connectivity/tools/HsqlDatabase.java +++ b/connectivity/qa/connectivity/tools/HsqlDatabase.java @@ -71,7 +71,8 @@ public class HsqlDatabase extends AbstractDatabase private void createDBDocument() throws Exception { final File documentFile = File.createTempFile("testdb", ".odb"); - documentFile.deleteOnExit(); + if ( documentFile.exists() ) + documentFile.delete(); m_databaseDocumentFile = URLHelper.getFileURLFromSystemPath(documentFile); m_databaseDocument = (XOfficeDatabaseDocument) UnoRuntime.queryInterface( diff --git a/connectivity/source/commontools/TDatabaseMetaDataBase.cxx b/connectivity/source/commontools/TDatabaseMetaDataBase.cxx index 1a763b0c10..0fb5336bba 100644 --- a/connectivity/source/commontools/TDatabaseMetaDataBase.cxx +++ b/connectivity/source/commontools/TDatabaseMetaDataBase.cxx @@ -144,7 +144,8 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getTypeInfo( ) throw(SQ ::dbtools::throwGenericSQLException(sError,*this); } } - + + ::connectivity::ODatabaseMetaDataResultSet::ORows aTypeInfoRows; while( xRet->next() ) { ::connectivity::ODatabaseMetaDataResultSet::ORow aRow; @@ -169,8 +170,9 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getTypeInfo( ) throw(SQ else ++aIter; } - m_aTypeInfoRows.push_back(aRow); + aTypeInfoRows.push_back(aRow); } + m_aTypeInfoRows = aTypeInfoRows; } } ::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTypeInfo); diff --git a/connectivity/source/drivers/mozab/bootstrap/makefile.mk b/connectivity/source/drivers/mozab/bootstrap/makefile.mk index 9b4b05868c..00f76ddeb8 100644 --- a/connectivity/source/drivers/mozab/bootstrap/makefile.mk +++ b/connectivity/source/drivers/mozab/bootstrap/makefile.mk @@ -30,37 +30,35 @@ #************************************************************************* CALL_CDECL=TRUE -#mozilla specific stuff. -MOZ_LIB=$(SOLARVERSION)$/$(INPATH)$/lib$(UPDMINOREXT) -MOZ_INC=$(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/mozilla -#End of mozilla specific stuff. - PRJ=..$/..$/..$/.. PRJINC=..$/..$/.. PRJNAME=connectivity TARGET=mozbootstrap -USE_DEFFILE=TRUE -ENABLE_EXCEPTIONS=TRUE -VISIBILITY_HIDDEN=TRUE - .IF "$(OS)" == "OS2" all: @echo " Not building under OS/2" .ENDIF # --- Settings ---------------------------------- -.IF "$(DBGUTIL_OJ)"!="" -ENVCFLAGS+=/FR$(SLO)$/ -.ENDIF +USE_DEFFILE=TRUE +ENABLE_EXCEPTIONS=TRUE +VISIBILITY_HIDDEN=TRUE + +# --- begin of mozilla specific stuff +MOZ_LIB=$(SOLARVERSION)$/$(INPATH)$/lib$(UPDMINOREXT) +MOZ_INC=$(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/mozilla +# --- end of mozilla specific stuff .INCLUDE : settings.mk .INCLUDE : $(PRJ)$/version.mk +.INCLUDE : ../makefile_mozab.mk + +INCPRE += -I../mozillasrc -#mozilla specific stuff. # --- Files ------------------------------------- SLOFILES += \ @@ -93,95 +91,6 @@ SLOFILES += \ $(SLO)$/MNSProfileDirServiceProvider.obj .ENDIF -CDEFS += -DMOZILLA_INTERNAL_API - -.IF "$(GUI)"=="UNX" -.IF "$(COMNAME)"=="sunpro5" -CFLAGS += -features=tmplife -#This flag is needed to build mozilla 1.7 code -.ENDIF # "$(COMNAME)"=="sunpro5" -.ENDIF - -MOZINC = . -I.. -I..$/mozillasrc -I$(MOZ_INC) -I$(MOZ_INC)$/nspr -I$(MOZ_INC)$/xpcom \ - -I$(MOZ_INC)$/string -I$(MOZ_INC)$/rdf -I$(MOZ_INC)$/msgbase \ - -I$(MOZ_INC)$/addrbook -I$(MOZ_INC)$/mork -I$(MOZ_INC)$/locale \ - -I$(MOZ_INC)$/pref -I$(MOZ_INC)$/mime -I$(MOZ_INC)$/chrome \ - -I$(MOZ_INC)$/necko -I$(MOZ_INC)$/intl -I$(MOZ_INC)$/profile \ - -I$(MOZ_INC)$/embed_base -I$(MOZ_INC)$/mozldap -I$(MOZ_INC)$/uconv\ - -I$(MOZ_INC)$/xpcom_obsolete -I$(MOZ_INC)$/content - -.IF "$(GUI)" == "WNT" -.IF "$(COM)" == "GCC" -INCPOST += $(MOZINC) -CDEFS += -DWINVER=0x400 -DMOZILLA_CLIENT \ - -DNS_NET_FILE -DCookieManagement -DSingleSignon -DClientWallet \ - -DTRACING -DXP_PC -DXP_WIN -DXP_WIN32 -DHW_THREADS \ - -DNS_MT_SUPPORTED -DNETLIB_THREAD \ - -DOJI -DWIN32 -D_X86_ -D_WINDOWS \ - -DMOZ_XUL -DMOZ_REFLOW_PERF -DMOZ_REFLOW_PERF_DSP \ - -DNSPR20 -DOS_HAS_DLL -DNO_JNI_STUBS \ - -DNETSCAPE -DMOZILLA_CLIENT -DJS_THREADSAFE -DNECKO -DINCLUDE_XUL -CFLAGSCXX += \ - -fno-rtti -Wall -Wconversion -Wpointer-arith \ - -Wcast-align -Woverloaded-virtual -Wsynth \ - -Wno-long-long -.ELSE -.IF "$(DBG_LEVEL)" == "0" -INCPRE += $(MOZINC) -CDEFS += -DWINVER=0x400 -DMOZILLA_CLIENT \ - -DNS_NET_FILE -DCookieManagement -DSingleSignon -DClientWallet \ - -DTRACING -DXP_PC -DXP_WIN -DXP_WIN32 -DHW_THREADS \ - -DDMSVC4 -DNS_MT_SUPPORTED -DNETLIB_THREAD \ - -DOJI -DWIN32 -D_X86_ -D_WINDOWS \ - -DMOZ_XUL -DMOZ_REFLOW_PERF -DMOZ_REFLOW_PERF_DSP \ - -DNSPR20 -DOS_HAS_DLL -DNO_JNI_STUBS \ - -DNETSCAPE -DMOZILLA_CLIENT -DJS_THREADSAFE -DNECKO -DINCLUDE_XUL \ - -UDEBUG -CFLAGS += -GR- -W3 -Gy -MD -UDEBUG -.ELSE -INCPRE += $(MOZINC) -CDEFS += -DWINVER=0x400 -DMOZILLA_CLIENT \ - -DNS_NET_FILE -DCookieManagement -DSingleSignon -DClientWallet \ - -DTRACING -DXP_PC -DXP_WIN -DXP_WIN32 -DHW_THREADS \ - -DDMSVC4 -DDEVELOPER_DEBUG -DNS_MT_SUPPORTED -DNETLIB_THREAD \ - -DOJI -DWIN32 -D_X86_ -D_WINDOWS \ - -DMOZ_XUL -DMOZ_REFLOW_PERF -DMOZ_REFLOW_PERF_DSP \ - -DDEBUG_Administrator -DNSPR20 -DOS_HAS_DLL -DNO_JNI_STUBS \ - -DNETSCAPE -DMOZILLA_CLIENT -DJS_THREADSAFE -DNECKO -DINCLUDE_XUL \ - -UDEBUG -CFLAGS += -Zi -GR- -W3 -Gy -MDd -UDEBUG -.IF "$(CCNUMVER)" >= "001399999999" -CDEFS += -D_STL_NOFORCE_MANIFEST -.ENDIF -.ENDIF -.ENDIF -.ENDIF -.IF "$(GUI)" == "UNX" -INCPOST += $(MOZINC) -CDEFS+= -DMOZILLA_CLIENT \ - -DXP_UNIX -.IF "$(OS)" == "LINUX" -CFLAGS += -fPIC -g -CDEFS+= -DOJI - -CFLAGSCXX += \ - -fno-rtti -Wconversion -Wpointer-arith \ - -Wcast-align -Woverloaded-virtual -Wsynth \ - -Wno-long-long -pthread -CDEFS += -DTRACING -.ELIF "$(OS)" == "NETBSD" || "$(OS)" == "MACOSX" -CFLAGS += -fPIC -CFLAGSCXX += \ - -fno-rtti -Wconversion -Wpointer-arith \ - -Wcast-align -Woverloaded-virtual -Wsynth \ - -Wno-long-long -Wno-deprecated -CDEFS += -DTRACING -.ENDIF - -SHL1TARGET_NAME=$(TARGET)$(MOZAB_MAJOR) - -.ENDIF # MACOSX - # --- Targets ---------------------------------- .INCLUDE : target.mk diff --git a/connectivity/source/drivers/mozab/makefile.mk b/connectivity/source/drivers/mozab/makefile.mk index 677e605096..76161dc321 100644 --- a/connectivity/source/drivers/mozab/makefile.mk +++ b/connectivity/source/drivers/mozab/makefile.mk @@ -43,38 +43,28 @@ all: @echo " see http://www.mozilla.org/issues/show_bug.cgi?id=91209" .ENDIF -#mozilla specific stuff. +# --- begin of mozilla specific stuff MOZ_LIB=$(SOLARVERSION)$/$(INPATH)$/lib$(UPDMINOREXT) MOZ_INC=$(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/mozilla .IF "$(OS)"=="WNT" -.IF "$(USE_SHELL)"=="4nt" -MOZ_EMBED_LIB := $(shell @+-dir /ba:f $(MOZ_LIB)$/embed_base_s.lib 2>NUL ) -MOZ_REG_LIB := $(shell @+-dir /ba:f $(MOZ_LIB)$/mozreg_s.lib 2>NUL ) -.ELSE #"$(USE_SHELL)"=="4nt" -MOZ_EMBED_LIB := $(shell @-test -f $(MOZ_LIB)$/embed_base_s.lib && echo $(MOZ_LIB)$/embed_base_s.lib ) -MOZ_REG_LIB := $(shell @-test -f $(MOZ_LIB)$/mozreg_s.lib && echo $(MOZ_LIB)$/mozreg_s.lib ) -.ENDIF + MOZ_EMBED_LIB := $(shell @-test -f $(MOZ_LIB)$/embed_base_s.lib && echo $(MOZ_LIB)$/embed_base_s.lib ) + MOZ_REG_LIB := $(shell @-test -f $(MOZ_LIB)$/mozreg_s.lib && echo $(MOZ_LIB)$/mozreg_s.lib ) -.IF X"$(MOZ_EMBED_LIB)"=="X" -MOZ_EMBED_LIB := $(MOZ_LIB)$/baseembed_s.lib -.ENDIF -.IF X"$(MOZ_REG_LIB)" == "X" -MOZ_REG_LIB := $(MOZ_LIB)$/mozreg.lib -.ENDIF -.ENDIF + MOZ_EMBED_LIB *:= $(MOZ_LIB)$/baseembed_s.lib + MOZ_REG_LIB *:= $(MOZ_LIB)$/mozreg.lib + + .IF "$(COM)"=="GCC" + MOZ_LIB_XPCOM= -L$(MOZ_LIB) -lembed_base_s -lnspr4 -lmozreg_s -lxpcom -lxpcom_core + .ELSE + LIB += $(MOZ_LIB) + MOZ_LIB_XPCOM= $(MOZ_EMBED_LIB) $(MOZ_LIB)$/nspr4.lib $(MOZ_REG_LIB) $(MOZ_LIB)$/xpcom.lib $(MOZ_LIB)$/xpcom_core.lib + .ENDIF -.IF "$(OS)"=="WNT" -.IF "$(COM)"=="GCC" -MOZ_LIB_XPCOM= -L$(MOZ_LIB) -lembed_base_s -lnspr4 -lmozreg_s -lxpcom -lxpcom_core -.ELSE -LIB += $(MOZ_LIB) -MOZ_LIB_XPCOM= $(MOZ_EMBED_LIB) $(MOZ_LIB)$/nspr4.lib $(MOZ_REG_LIB) $(MOZ_LIB)$/xpcom.lib $(MOZ_LIB)$/xpcom_core.lib -.ENDIF .ELSE "$(OS)"=="WNT" -MOZ_LIB_XPCOM= -L$(MOZ_LIB) -lnspr4 -lxpcom_core -lmozreg_s -lembed_base_s + MOZ_LIB_XPCOM = -L$(MOZ_LIB) -lnspr4 -lxpcom_core -lmozreg_s -lembed_base_s .ENDIF -#End of mozilla specific stuff. +# --- end of mozilla specific stuff USE_DEFFILE=TRUE ENABLE_EXCEPTIONS=TRUE @@ -87,10 +77,6 @@ COMPONENT_CONFIG_SCHEMA=$(TARGET)2.xcs # --- Settings ---------------------------------- -.IF "$(DBGUTIL_OJ)"!="" -ENVCFLAGS+=/FR$(SLO)$/ -.ENDIF - .INCLUDE : $(PRJ)$/makefile.pmk .INCLUDE : $(PRJ)$/version.mk @@ -121,7 +107,6 @@ DEF1NAME= $(SHL1TARGET) DEF1DEPN= $(MISC)$/$(SHL1TARGET).flt \ $(SLB)$/$(TARGET).lib DEFLIB1NAME=$(TARGET) -#DEF1EXPORTFILE= exports.dxp # --- Files ------------------------------------- @@ -165,6 +150,7 @@ DEPOBJFILES=$(SLO2FILES) # --- MOZAB BASE Library ----------------------------------- SHL2VERSIONMAP= $(TARGET2).map +SHL2NOCHECK=TRUE SHL2TARGET= $(TARGET2)$(DLLPOSTFIX) SHL2OBJS=$(SLO2FILES) SHL2STDLIBS=\ diff --git a/connectivity/source/drivers/mozab/makefile_mozab.mk b/connectivity/source/drivers/mozab/makefile_mozab.mk new file mode 100644 index 0000000000..28b56ec2a8 --- /dev/null +++ b/connectivity/source/drivers/mozab/makefile_mozab.mk @@ -0,0 +1,128 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2008 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +CDEFS += -DMOZILLA_INTERNAL_API + +.IF "$(GUI)"=="UNX" + .IF "$(COMNAME)"=="sunpro5" + CFLAGS += -features=tmplife + #This flag is needed to build mozilla 1.7 code + .ENDIF # "$(COMNAME)"=="sunpro5" +.ENDIF + +MOZINC = . \ + -I.. \ + -I$(MOZ_INC) \ + -I$(MOZ_INC)$/nspr \ + -I$(MOZ_INC)$/xpcom \ + -I$(MOZ_INC)$/string \ + -I$(MOZ_INC)$/rdf \ + -I$(MOZ_INC)$/msgbase \ + -I$(MOZ_INC)$/addrbook \ + -I$(MOZ_INC)$/mork \ + -I$(MOZ_INC)$/locale \ + -I$(MOZ_INC)$/pref \ + -I$(MOZ_INC)$/mime \ + -I$(MOZ_INC)$/chrome \ + -I$(MOZ_INC)$/necko \ + -I$(MOZ_INC)$/intl \ + -I$(MOZ_INC)$/profile \ + -I$(MOZ_INC)$/embed_base \ + -I$(MOZ_INC)$/mozldap \ + -I$(MOZ_INC)$/uconv \ + -I$(MOZ_INC)$/xpcom_obsolete \ + -I$(MOZ_INC)$/content + +.IF "$(GUI)" == "WNT" + CDEFS += \ + -DMOZILLA_CLIENT \ + -DXP_PC \ + -DXP_WIN \ + -DXP_WIN32 \ + -DOJI \ + -DWIN32 \ + -D_X86_ \ + -D_WINDOWS \ + -DMOZ_XUL \ + -DMOZ_REFLOW_PERF \ + -DMOZ_REFLOW_PERF_DSP + .IF "$(COM)" == "GCC" + INCPOST += $(MOZINC) + CFLAGSCXX += \ + -fno-rtti \ + -Wall \ + -Wconversion \ + -Wpointer-arith \ + -Wcast-align \ + -Woverloaded-virtual \ + -Wsynth \ + -Wno-long-long + .ELSE # .IF "$(COM)" == "GCC" + INCPRE += $(MOZINC) + .IF "$(DBG_LEVEL)" != "0" + .IF "$(CCNUMVER)" >= "001399999999" + CDEFS += -D_STL_NOFORCE_MANIFEST + .ENDIF # .IF "$(CCNUMVER)" >= "001399999999" + .ENDIF # .IF "$(DBG_LEVEL)" != "0" + .ENDIF # .IF "$(COM)" == "GCC" +.ENDIF # .IF "$(GUI)" == "WNT" + +.IF "$(GUI)" == "UNX" + INCPOST += $(MOZINC) + CDEFS+= -DMOZILLA_CLIENT \ + -DXP_UNIX + .IF "$(OS)" == "LINUX" + CFLAGS += -fPIC -g + CDEFS += -DOJI + CFLAGSCXX += \ + -fno-rtti \ + -Wconversion \ + -Wpointer-arith \ + -Wcast-align \ + -Woverloaded-virtual \ + -Wsynth \ + -Wno-long-long \ + -pthread + CDEFS += -DTRACING + .ELIF "$(OS)" == "NETBSD" || "$(OS)" == "MACOSX" + CFLAGS += -fPIC + CFLAGSCXX += \ + -fno-rtti \ + -Wconversion \ + -Wpointer-arith \ + -Wcast-align \ + -Woverloaded-virtual \ + -Wsynth \ + -Wno-long-long \ + -Wno-deprecated + CDEFS += -DTRACING + .ENDIF # "$(OS)" == "NETBSD" || "$(OS)" == "MACOSX" + + SHL1TARGET_NAME=$(TARGET)$(MOZAB_MAJOR) + +.ENDIF # "$(GUI)" == "UNX" + diff --git a/connectivity/source/drivers/mozab/mozillasrc/makefile.mk b/connectivity/source/drivers/mozab/mozillasrc/makefile.mk index e31d4c7e41..1e5b39e0f1 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/makefile.mk +++ b/connectivity/source/drivers/mozab/mozillasrc/makefile.mk @@ -40,16 +40,12 @@ PRJINC=..$/..$/.. PRJNAME=connectivity TARGET=mozabsrc +# --- Settings ---------------------------------- + USE_DEFFILE=TRUE ENABLE_EXCEPTIONS=TRUE VISIBILITY_HIDDEN=TRUE -# --- Settings ---------------------------------- -.IF "$(DBGUTIL_OJ)"!="" -ENVCFLAGS+=/FR$(SLO)$/ -.ENDIF - - .INCLUDE : settings.mk .IF ("$(SYSTEM_MOZILLA)" == "YES" && "$(WITH_MOZILLA)" == "YES") || "$(WITH_MOZILLA)" == "NO" || "$(OS)" == "OS2" @@ -61,8 +57,10 @@ dummy: .INCLUDE : $(PRJ)$/version.mk +.INCLUDE : ../makefile_mozab.mk + +INCPRE += -I../bootstrap -#mozilla specific stuff. # --- Files ------------------------------------- SLOFILES = \ @@ -74,98 +72,9 @@ SLOFILES = \ $(SLO)$/MNSMozabProxy.obj \ $(SLO)$/MNSTerminateListener.obj \ $(SLO)$/MLdapAttributeMap.obj \ - - -CDEFS += -DMOZILLA_INTERNAL_API -.IF "$(GUI)"=="UNX" -.IF "$(COMNAME)"=="sunpro5" -CFLAGS += -features=tmplife -#This flag is needed to build mozilla 1.7 code -.ENDIF # "$(COMNAME)"=="sunpro5" .ENDIF -MOZINC = . -I.. -I..$/bootstrap -I$(MOZ_INC) -I$(MOZ_INC)$/nspr -I$(MOZ_INC)$/xpcom \ - -I$(MOZ_INC)$/string -I$(MOZ_INC)$/rdf -I$(MOZ_INC)$/msgbase \ - -I$(MOZ_INC)$/addrbook -I$(MOZ_INC)$/mork -I$(MOZ_INC)$/locale \ - -I$(MOZ_INC)$/pref -I$(MOZ_INC)$/mime -I$(MOZ_INC)$/chrome \ - -I$(MOZ_INC)$/necko -I$(MOZ_INC)$/intl -I$(MOZ_INC)$/profile \ - -I$(MOZ_INC)$/embed_base -I$(MOZ_INC)$/mozldap -I$(MOZ_INC)$/uconv\ - -I$(MOZ_INC)$/xpcom_obsolete -I$(MOZ_INC)$/content - -.IF "$(GUI)" == "WNT" -.IF "$(COM)"=="GCC" -INCPOST += $(MOZINC) -CDEFS += -DWINVER=0x400 -DMOZILLA_CLIENT \ - -DNS_NET_FILE -DCookieManagement -DSingleSignon -DClientWallet \ - -DTRACING -DXP_PC -DXP_WIN -DXP_WIN32 -DHW_THREADS \ - -DNS_MT_SUPPORTED -DNETLIB_THREAD \ - -DOJI -DWIN32 -D_X86_ -D_WINDOWS \ - -DMOZ_XUL -DMOZ_REFLOW_PERF -DMOZ_REFLOW_PERF_DSP \ - -DNSPR20 -DOS_HAS_DLL -DNO_JNI_STUBS \ - -DNETSCAPE -DMOZILLA_CLIENT -DJS_THREADSAFE -DNECKO -DINCLUDE_XUL -CFLAGSCXX += \ - -fno-rtti -Wall -Wconversion -Wpointer-arith \ - -Wcast-align -Woverloaded-virtual -Wsynth \ - -Wno-long-long -.ELSE -.IF "$(DBG_LEVEL)" == "0" -INCPRE += $(MOZINC) -CDEFS += -DWINVER=0x400 -DMOZILLA_CLIENT \ - -DNS_NET_FILE -DCookieManagement -DSingleSignon -DClientWallet \ - -DTRACING -DXP_PC -DXP_WIN -DXP_WIN32 -DHW_THREADS \ - -DDMSVC4 -DNS_MT_SUPPORTED -DNETLIB_THREAD \ - -DOJI -DWIN32 -D_X86_ -D_WINDOWS \ - -DMOZ_XUL -DMOZ_REFLOW_PERF -DMOZ_REFLOW_PERF_DSP \ - -DNSPR20 -DOS_HAS_DLL -DNO_JNI_STUBS \ - -DNETSCAPE -DMOZILLA_CLIENT -DJS_THREADSAFE -DNECKO -DINCLUDE_XUL \ - -UDEBUG -CFLAGS += -GR- -W3 -Gy -MD -UDEBUG -.ELSE -INCPRE += $(MOZINC) -CDEFS += -DWINVER=0x400 -DMOZILLA_CLIENT \ - -DNS_NET_FILE -DCookieManagement -DSingleSignon -DClientWallet \ - -DTRACING -DXP_PC -DXP_WIN -DXP_WIN32 -DHW_THREADS \ - -DDMSVC4 -DDEVELOPER_DEBUG -DNS_MT_SUPPORTED -DNETLIB_THREAD \ - -DOJI -DWIN32 -D_X86_ -D_WINDOWS \ - -DMOZ_XUL -DMOZ_REFLOW_PERF -DMOZ_REFLOW_PERF_DSP \ - -DDEBUG_Administrator -DNSPR20 -DOS_HAS_DLL -DNO_JNI_STUBS \ - -DNETSCAPE -DMOZILLA_CLIENT -DJS_THREADSAFE -DNECKO -DINCLUDE_XUL \ - -UDEBUG -CFLAGS += -Zi -GR- -W3 -Gy -MDd -UDEBUG -.IF "$(CCNUMVER)" >= "001399999999" -CDEFS += -D_STL_NOFORCE_MANIFEST -.ENDIF -.ENDIF -.ENDIF -.ENDIF -.IF "$(GUI)" == "UNX" -INCPOST += $(MOZINC) -CDEFS+= -DMOZILLA_CLIENT \ - -DXP_UNIX -.IF "$(OS)" == "LINUX" -CFLAGS += -fPIC -g -CDEFS+= -DOJI - -CFLAGSCXX += \ - -fno-rtti -Wconversion -Wpointer-arith \ - -Wcast-align -Woverloaded-virtual -Wsynth \ - -Wno-long-long -pthread -CDEFS += -DTRACING -.ELIF "$(OS)" == "NETBSD" || "$(OS)" == "MACOSX" -CFLAGS += -fPIC -CFLAGSCXX += \ - -fno-rtti -Wconversion -Wpointer-arith \ - -Wcast-align -Woverloaded-virtual -Wsynth \ - -Wno-long-long -Wno-deprecated -CDEFS += -DTRACING -.ENDIF -.ENDIF - -SHL1TARGET_NAME=$(TARGET)$(MOZAB_MAJOR) - -.ENDIF # MACOSX - # --- Targets ---------------------------------- .INCLUDE : target.mk diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx index 69e8baed31..b52c8b7c43 100644 --- a/embeddedobj/source/general/docholder.cxx +++ b/embeddedobj/source/general/docholder.cxx @@ -83,6 +83,7 @@ #include <rtl/process.h> #include <comphelper/processfactory.hxx> +#include <comphelper/namedvaluecollection.hxx> #include "docholder.hxx" #include "commonembobj.hxx" @@ -1025,20 +1026,14 @@ sal_Bool DocumentHolder::LoadDocToFrame( sal_Bool bInPlace ) if ( xDoc.is() ) { // load new document in to the frame - uno::Reference< frame::XComponentLoader > xComponentLoader( m_xFrame, uno::UNO_QUERY ); - if( !xComponentLoader.is() ) - throw uno::RuntimeException(); + uno::Reference< frame::XComponentLoader > xComponentLoader( m_xFrame, uno::UNO_QUERY_THROW ); - uno::Sequence< beans::PropertyValue > aArgs( bInPlace ? 3 : 2 ); - aArgs[0].Name = ::rtl::OUString::createFromAscii( "Model" ); - aArgs[0].Value <<= m_xComponent; - aArgs[1].Name = ::rtl::OUString::createFromAscii( "ReadOnly" ); - aArgs[1].Value <<= m_bReadOnly; + ::comphelper::NamedValueCollection aArgs; + aArgs.put( "Model", m_xComponent ); + aArgs.put( "ReadOnly", m_bReadOnly ); + //aArgs.put( "Hidden", sal_True ); if ( bInPlace ) - { - aArgs[2].Name = ::rtl::OUString::createFromAscii( "PluginMode" ); - aArgs[2].Value <<= sal_Int16(1); - } + aArgs.put( "PluginMode", sal_Int16(1) ); ::rtl::OUString sUrl; uno::Reference< lang::XServiceInfo> xServiceInfo(xDoc,uno::UNO_QUERY); if ( xServiceInfo.is() @@ -1055,7 +1050,7 @@ sal_Bool DocumentHolder::LoadDocToFrame( sal_Bool bInPlace ) xComponentLoader->loadComponentFromURL( sUrl, rtl::OUString::createFromAscii( "_self" ), 0, - aArgs ); + aArgs.getPropertyValues() ); return sal_True; } diff --git a/framework/inc/macros/registration.hxx b/framework/inc/macros/registration.hxx index 153f588322..f79d22edbe 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 9bead3c4e7..e246964b69 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 5d3d248b3c..853553a82b 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 7df1747c7b..8955e2b19e 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 f4d4f2ce7e..03b9b02e66 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 b9b6bcf248..3af616971a 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 1e15c55bd2..7d7f00e945 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 7dbe62e38a..2c540fd4c3 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 diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index 5a64421423..c4b9e49aef 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -81,6 +81,7 @@ #include <vos/mutex.hxx> #include <osl/mutex.hxx> +#include <tools/diagnose_ex.h> #include <comphelper/sequence.hxx> #include <rtl/ustrbuf.hxx> #include <toolkit/helper/convert.hxx> @@ -706,6 +707,29 @@ void SAL_CALL SfxBaseController::attachFrame( const REFERENCE< XFRAME >& xFrame SfxViewFrame* pActFrame = m_pData->m_pViewShell->GetFrame() ; pActFrame->Enable( TRUE ); pActFrame->GetDispatcher()->Lock( FALSE ); + + if ( ( m_pData->m_pViewShell->GetObjectShell() != NULL ) + && ( m_pData->m_pViewShell->GetObjectShell()->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ) + ) + { + SfxViewFrame* pViewFrm = m_pData->m_pViewShell->GetViewFrame(); + if ( !pViewFrm->GetFrame()->IsInPlace() ) + { + // for outplace embedded objects, we want the layout manager to keep the content window + // size constant, if possible + try + { + uno::Reference< beans::XPropertySet > xFrameProps( m_pData->m_xFrame, uno::UNO_QUERY_THROW ); + uno::Reference< beans::XPropertySet > xLayouterProps( + xFrameProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" ) ) ), uno::UNO_QUERY_THROW ); + xLayouterProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PreserveContentSize" ) ), uno::makeAny( sal_True ) ); + } + catch( const uno::Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + } + } } } } diff --git a/svx/inc/fmhelp.hrc b/svx/inc/fmhelp.hrc index 0d00d17f39..b984e74c38 100644 --- a/svx/inc/fmhelp.hrc +++ b/svx/inc/fmhelp.hrc @@ -33,106 +33,75 @@ // include ----------------------------------------------------------- #include <svtools/solar.hrc> -// in solar.hrc -//#define HID_FORMS_START (HID_LIB_START+4000) -//#define HID_FORMS_END (HID_LIB_START+4999) - // Help-Ids -------------------------------------------------------------- -// insgesamt 200 -#define HID_DLG_DBINFO (HID_FORMS_START + 0) -#define HID_DLG_DBMSG (HID_FORMS_START + 1) - -#define HID_FM_OTHER_START (HID_FORMS_START + 300) -#define HID_FORM_NAVIGATOR (HID_FM_OTHER_START + 0) -#define HID_FORM_NAVIGATOR_WIN (HID_FM_OTHER_START + 1) -#define HID_FIELD_SEL (HID_FM_OTHER_START + 2) -#define HID_FIELD_SEL_WIN (HID_FM_OTHER_START + 3) -#define HID_FILTER_NAVIGATOR (HID_FM_OTHER_START + 4) -#define HID_FILTER_NAVIGATOR_WIN (HID_FM_OTHER_START + 5) - -#define HID_FORM_DLG_START (HID_FORMS_START + 400) -// FREE -// FREE -// FREE -#define HID_FM_PROPDLG_WINDOW (HID_FORM_DLG_START + 3) -#define HID_FM_PROPDLG_CONTAINER (HID_FORM_DLG_START + 4) -#define HID_FM_PROPDLG_TABCTR (HID_FORM_DLG_START + 5) -#define HID_FM_PROPDLG_TAB_GENERAL (HID_FORM_DLG_START + 6) -#define HID_FM_PROPDLG_TAB_DATA (HID_FORM_DLG_START + 7) -#define HID_FM_PROPDLG_TAB_EVT (HID_FORM_DLG_START + 8) -#define HID_FM_DLG_SEARCH (HID_FORM_DLG_START + 9) - -#define HID_SEARCH_TEXT (HID_FORM_DLG_START + 10) -#define HID_SEARCH_ALLFIELDS (HID_FORM_DLG_START + 11) -#define HID_SEARCH_SINGLEFIELD (HID_FORM_DLG_START + 12) -#define HID_SEARCH_FIELDSELECTION (HID_FORM_DLG_START + 13) -#define HID_SEARCH_POSITION (HID_FORM_DLG_START + 14) -#define HID_SEARCH_FORMATTER (HID_FORM_DLG_START + 15) -#define HID_SEARCH_CASE (HID_FORM_DLG_START + 16) -#define HID_SEARCH_BACKWARD (HID_FORM_DLG_START + 17) -#define HID_SEARCH_STARTOVER (HID_FORM_DLG_START + 18) -#define HID_SEARCH_WILDCARD (HID_FORM_DLG_START + 19) -#define HID_SEARCH_REGULAR (HID_FORM_DLG_START + 20) -#define HID_SEARCH_APPROX (HID_FORM_DLG_START + 21) -#define HID_SEARCH_APPROXSETTINGS (HID_FORM_DLG_START + 22) -#define HID_SEARCH_BTN_SEARCH (HID_FORM_DLG_START + 23) -#define HID_SEARCH_BTN_CLOSE (HID_FORM_DLG_START + 24) - -#define HID_TABORDER_CONTROLS (HID_FORM_DLG_START + 25) - -#define HID_CONTROLS_DATE_N_TIME (HID_FORM_DLG_START + 26) -#define HID_FM_DLG_PARAM (HID_FORM_DLG_START + 27) - -#define HID_GRID_TRAVEL_FIRST (HID_FORM_DLG_START + 28) -#define HID_GRID_TRAVEL_PREV (HID_FORM_DLG_START + 29) -#define HID_GRID_TRAVEL_NEXT (HID_FORM_DLG_START + 30) -#define HID_GRID_TRAVEL_LAST (HID_FORM_DLG_START + 31) -#define HID_GRID_TRAVEL_NEW (HID_FORM_DLG_START + 32) -#define HID_GRID_TRAVEL_ABSOLUTE (HID_FORM_DLG_START + 33) -#define HID_GRID_NUMBEROFRECORDS (HID_FORM_DLG_START + 34) - -#define UID_SEARCH_RECORDSTATUS (HID_FORM_DLG_START + 35) - -#define UID_FORMPROPBROWSER_FRAME (HID_FORM_DLG_START + 37) -#define UID_ABSOLUTE_RECORD_WINDOW (HID_FORM_DLG_START + 38) - -#define HID_DATA_NAVIGATOR_WIN (HID_FM_OTHER_START + 39) -#define HID_XFORMS_ADDDATAITEM_DLG (HID_FM_OTHER_START + 40) -#define HID_XFORMS_ADDCONDITION_DLG (HID_FM_OTHER_START + 41) -#define HID_XFORMS_NAMESPACEITEM_DLG (HID_FM_OTHER_START + 42) -#define HID_XFORMS_NAMESPACEITEM_LIST (HID_FM_OTHER_START + 43) -#define HID_XFORMS_MANAGENAMESPACE_DLG (HID_FM_OTHER_START + 44) - -#define HID_TP_XFORMS_INSTANCE (HID_FM_OTHER_START + 45) -#define HID_TP_XFORMS_SUBMISSION (HID_FM_OTHER_START + 46) -#define HID_TP_XFORMS_BINDING (HID_FM_OTHER_START + 47) - -#define HID_MN_XFORMS_MODELS_ADD (HID_FM_OTHER_START + 48) -#define HID_MN_XFORMS_MODELS_EDIT (HID_FM_OTHER_START + 49) -#define HID_MN_XFORMS_MODELS_REMOVE (HID_FM_OTHER_START + 50) -#define HID_MN_XFORMS_INSTANCES_ADD (HID_FM_OTHER_START + 51) -#define HID_MN_XFORMS_INSTANCES_EDIT (HID_FM_OTHER_START + 52) -#define HID_MN_XFORMS_INSTANCES_REMOVE (HID_FM_OTHER_START + 53) -#define HID_MN_XFORMS_SHOW_DETAILS (HID_FM_OTHER_START + 54) -#define HID_XFORMS_TOOLBOX (HID_FM_OTHER_START + 55) -#define HID_XFORMS_TOOLBOX_ITEM_ADD (HID_FM_OTHER_START + 56) -#define HID_XFORMS_TOOLBOX_ITEM_ADD_ELEMENT (HID_FM_OTHER_START + 57) -#define HID_XFORMS_TOOLBOX_ITEM_ADD_ATTRIBUTE (HID_FM_OTHER_START + 58) -#define HID_XFORMS_TOOLBOX_ITEM_EDIT (HID_FM_OTHER_START + 59) -#define HID_XFORMS_TOOLBOX_ITEM_REMOVE (HID_FM_OTHER_START + 60) -#define HID_XFORMS_ITEMS_LIST (HID_FM_OTHER_START + 61) -#define HID_XFORMS_MODELS_LIST (HID_FM_OTHER_START + 62) -#define HID_XFORMS_MODELS_MENUBTN (HID_FM_OTHER_START + 63) -#define HID_XFORMS_INSTANCES_MENUBTN (HID_FM_OTHER_START + 64) -#define HID_XFORMS_ADDSUBMISSION_DLG (HID_FM_OTHER_START + 65) -#define HID_XFORMS_ADDMODEL_DLG (HID_FM_OTHER_START + 66) -#define HID_XFORMS_ADDINSTANCE_DLG (HID_FM_OTHER_START + 67) -#define HID_XFORMS_MID_INSERT_CONTROL (HID_FM_OTHER_START + 68) -#define HID_XFORMS_TAB_CONTROL (HID_FM_OTHER_START + 69) - -// if you add a new define here, please adjust the overflow check -// at the end of the file!! +#define HID_DLG_DBMSG ( HID_FORMS_START + 1) +#define HID_FORM_NAVIGATOR ( HID_FORMS_START + 2) +#define HID_FORM_NAVIGATOR_WIN ( HID_FORMS_START + 3) +#define HID_FIELD_SEL ( HID_FORMS_START + 4) +#define HID_FIELD_SEL_WIN ( HID_FORMS_START + 5) +#define HID_FILTER_NAVIGATOR ( HID_FORMS_START + 6) +#define HID_FILTER_NAVIGATOR_WIN ( HID_FORMS_START + 7) +#define HID_FM_DLG_SEARCH ( HID_FORMS_START + 8) +#define HID_SEARCH_TEXT ( HID_FORMS_START + 9) +#define HID_SEARCH_ALLFIELDS ( HID_FORMS_START + 10) +#define HID_SEARCH_SINGLEFIELD ( HID_FORMS_START + 11) +#define HID_SEARCH_FIELDSELECTION ( HID_FORMS_START + 12) +#define HID_SEARCH_POSITION ( HID_FORMS_START + 13) +#define HID_SEARCH_FORMATTER ( HID_FORMS_START + 14) +#define HID_SEARCH_CASE ( HID_FORMS_START + 15) +#define HID_SEARCH_BACKWARD ( HID_FORMS_START + 16) +#define HID_SEARCH_STARTOVER ( HID_FORMS_START + 17) +#define HID_SEARCH_WILDCARD ( HID_FORMS_START + 18) +#define HID_SEARCH_REGULAR ( HID_FORMS_START + 19) +#define HID_SEARCH_APPROX ( HID_FORMS_START + 20) +#define HID_SEARCH_APPROXSETTINGS ( HID_FORMS_START + 21) +#define HID_SEARCH_BTN_SEARCH ( HID_FORMS_START + 22) +#define HID_SEARCH_BTN_CLOSE ( HID_FORMS_START + 23) +#define HID_CONTROLS_DATE_N_TIME ( HID_FORMS_START + 24) +#define HID_GRID_TRAVEL_FIRST ( HID_FORMS_START + 25) +#define HID_GRID_TRAVEL_PREV ( HID_FORMS_START + 26) +#define HID_GRID_TRAVEL_NEXT ( HID_FORMS_START + 27) +#define HID_GRID_TRAVEL_LAST ( HID_FORMS_START + 28) +#define HID_GRID_TRAVEL_NEW ( HID_FORMS_START + 29) +#define HID_GRID_TRAVEL_ABSOLUTE ( HID_FORMS_START + 30) +#define HID_GRID_NUMBEROFRECORDS ( HID_FORMS_START + 31) +#define UID_SEARCH_RECORDSTATUS ( HID_FORMS_START + 32) +#define UID_FORMPROPBROWSER_FRAME ( HID_FORMS_START + 33) +#define UID_ABSOLUTE_RECORD_WINDOW ( HID_FORMS_START + 34) +#define HID_DATA_NAVIGATOR_WIN ( HID_FORMS_START + 35) +#define HID_XFORMS_ADDDATAITEM_DLG ( HID_FORMS_START + 36) +#define HID_XFORMS_ADDCONDITION_DLG ( HID_FORMS_START + 37) +#define HID_XFORMS_NAMESPACEITEM_DLG ( HID_FORMS_START + 38) +#define HID_XFORMS_NAMESPACEITEM_LIST ( HID_FORMS_START + 39) +#define HID_XFORMS_MANAGENAMESPACE_DLG ( HID_FORMS_START + 40) +#define HID_TP_XFORMS_INSTANCE ( HID_FORMS_START + 41) +#define HID_TP_XFORMS_SUBMISSION ( HID_FORMS_START + 42) +#define HID_TP_XFORMS_BINDING ( HID_FORMS_START + 43) +#define HID_MN_XFORMS_MODELS_ADD ( HID_FORMS_START + 44) +#define HID_MN_XFORMS_MODELS_EDIT ( HID_FORMS_START + 45) +#define HID_MN_XFORMS_MODELS_REMOVE ( HID_FORMS_START + 46) +#define HID_MN_XFORMS_INSTANCES_ADD ( HID_FORMS_START + 47) +#define HID_MN_XFORMS_INSTANCES_EDIT ( HID_FORMS_START + 48) +#define HID_MN_XFORMS_INSTANCES_REMOVE ( HID_FORMS_START + 49) +#define HID_MN_XFORMS_SHOW_DETAILS ( HID_FORMS_START + 50) +#define HID_XFORMS_TOOLBOX ( HID_FORMS_START + 51) +#define HID_XFORMS_TOOLBOX_ITEM_ADD ( HID_FORMS_START + 52) +#define HID_XFORMS_TOOLBOX_ITEM_ADD_ELEMENT ( HID_FORMS_START + 53) +#define HID_XFORMS_TOOLBOX_ITEM_ADD_ATTRIBUTE ( HID_FORMS_START + 54) +#define HID_XFORMS_TOOLBOX_ITEM_EDIT ( HID_FORMS_START + 55) +#define HID_XFORMS_TOOLBOX_ITEM_REMOVE ( HID_FORMS_START + 56) +#define HID_XFORMS_ITEMS_LIST ( HID_FORMS_START + 57) +#define HID_XFORMS_MODELS_LIST ( HID_FORMS_START + 58) +#define HID_XFORMS_MODELS_MENUBTN ( HID_FORMS_START + 59) +#define HID_XFORMS_INSTANCES_MENUBTN ( HID_FORMS_START + 60) +#define HID_XFORMS_ADDSUBMISSION_DLG ( HID_FORMS_START + 61) +#define HID_XFORMS_ADDMODEL_DLG ( HID_FORMS_START + 62) +#define HID_XFORMS_ADDINSTANCE_DLG ( HID_FORMS_START + 63) +#define HID_XFORMS_MID_INSERT_CONTROL ( HID_FORMS_START + 64) +#define HID_XFORMS_TAB_CONTROL ( HID_FORMS_START + 65) + // if you add a new define here, please adjust the overflow check + // at the end of the file!! // ----------------------------------------------------------------------- diff --git a/svx/util/hidother.src b/svx/util/hidother.src index 5bce7c359e..b4a5b7674a 100644 --- a/svx/util/hidother.src +++ b/svx/util/hidother.src @@ -71,11 +71,6 @@ hidspecial HID_FIELD_SEL_WIN { HelpID =HID_FIELD_SEL_WIN ;}; hidspecial HID_FILTER_NAVIGATOR { HelpID =HID_FILTER_NAVIGATOR ;}; hidspecial HID_FILTER_NAVIGATOR_WIN { HelpID =HID_FILTER_NAVIGATOR_WIN ;}; -hidspecial HID_FM_PROPDLG_TABCTR { HelpID =HID_FM_PROPDLG_TABCTR ;}; -hidspecial HID_FM_PROPDLG_TAB_GENERAL { HelpID =HID_FM_PROPDLG_TAB_GENERAL;}; -hidspecial HID_FM_PROPDLG_TAB_DATA { HelpID =HID_FM_PROPDLG_TAB_DATA ;}; -hidspecial HID_FM_PROPDLG_TAB_EVT { HelpID =HID_FM_PROPDLG_TAB_EVT ;}; - hidspecial HID_VALUESET_SINGLENUM { HelpID = HID_VALUESET_SINGLENUM ;}; hidspecial HID_VALUESET_BULLET { HelpID = HID_VALUESET_BULLET ;}; hidspecial HID_VALUESET_NUM { HelpID = HID_VALUESET_NUM ;}; @@ -88,8 +83,6 @@ hidspecial HID_TPPAGE_FULLSIZE { HelpId = HID_TPPAGE_FULLSIZE ;}; hidspecial HID_OPTINET2_CTL_COOKIES { HelpId = HID_OPTINET2_CTL_COOKIES ;}; hidspecial HID_OPTPATH_CTL_PATH { HelpId = HID_OPTPATH_CTL_PATH ;}; -hidspecial HID_TABORDER_CONTROLS { HelpId = HID_TABORDER_CONTROLS ;}; - hidspecial HID_POPUP_LINEEND { HelpId = HID_POPUP_LINEEND ;}; hidspecial HID_POPUP_LINEEND_CTRL { HelpId = HID_POPUP_LINEEND_CTRL ;}; diff --git a/xmloff/source/forms/gridcolumnproptranslator.cxx b/xmloff/source/forms/gridcolumnproptranslator.cxx index ae8975bc20..d5e647f4b2 100644 --- a/xmloff/source/forms/gridcolumnproptranslator.cxx +++ b/xmloff/source/forms/gridcolumnproptranslator.cxx @@ -235,9 +235,15 @@ namespace xmloff } //-------------------------------------------------------------------- - void SAL_CALL OGridColumnPropertyTranslator::setPropertyValue( const ::rtl::OUString& aPropertyName, const Any& aValue ) throw (UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException) + void SAL_CALL OGridColumnPropertyTranslator::setPropertyValue( const ::rtl::OUString& _rPropertyName, const Any& aValue ) throw (UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException) { - Sequence< ::rtl::OUString > aNames( &aPropertyName, 1 ); + // we implement this by delegating it to setPropertyValues, which is to ignore unknown properties. On the other hand, our + // contract requires us to throw a UnknownPropertyException for unknown properties, so check this first. + + if ( !getPropertySetInfo()->hasPropertyByName( _rPropertyName ) ) + throw UnknownPropertyException( _rPropertyName, *this ); + + Sequence< ::rtl::OUString > aNames( &_rPropertyName, 1 ); Sequence< Any > aValues( &aValue, 1 ); setPropertyValues( aNames, aValues ); } diff --git a/xmloff/source/text/txtstyli.cxx b/xmloff/source/text/txtstyli.cxx index 1e4dab709f..9b82d3ce3b 100644 --- a/xmloff/source/text/txtstyli.cxx +++ b/xmloff/source/text/txtstyli.cxx @@ -30,34 +30,29 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#include <com/sun/star/frame/XModel.hpp> -#include <com/sun/star/style/XStyle.hpp> + +#include "XMLTextPropertySetContext.hxx" +#include "xmlnmspe.hxx" +#include "xmloff/XMLEventsImportContext.hxx" +#include "xmloff/attrlist.hxx" +#include "xmloff/families.hxx" +#include "xmloff/txtprmap.hxx" +#include "xmloff/txtstyli.hxx" +#include "xmloff/xmlimp.hxx" +#include "xmloff/xmltkmap.hxx" +#include "xmloff/xmltoken.hxx" +#include "xmloff/xmluconv.hxx" + +#include <com/sun/star/beans/XMultiPropertySet.hpp> #include <com/sun/star/container/XNameContainer.hpp> +#include <com/sun/star/document/XEventsSupplier.hpp> +#include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/style/ParagraphStyleCategory.hpp> -#ifndef _COM_SUN_STAR_DOCUMENT_XEVENTSSUPPLIER_HPP -#include <com/sun/star/document/XEventsSupplier.hpp> -#endif -#include <com/sun/star/beans/XMultiPropertySet.hpp> -#include "xmlnmspe.hxx" -#include <xmloff/xmltoken.hxx> -#ifndef _XMLOFF_FAMILIES_HXX -#include <xmloff/families.hxx> -#endif -#include "XMLTextPropertySetContext.hxx" -#include <xmloff/xmltkmap.hxx> -#include <xmloff/xmlimp.hxx> -#include <xmloff/xmluconv.hxx> - -#ifndef _XMLOFF_TXTPRMAP_HXX -#include <xmloff/txtprmap.hxx> -#endif -#ifndef _XMLOFF_TXTSTYLI_HXX -#include <xmloff/txtstyli.hxx> -#endif -#include <xmloff/attrlist.hxx> -#include <xmloff/XMLEventsImportContext.hxx> +#include <com/sun/star/style/XStyle.hpp> + #include <tools/debug.hxx> +#include <tools/diagnose_ex.h> // STL includes #include <algorithm> @@ -464,6 +459,9 @@ void XMLTextStyleContext::FillPropertySet( { -1, -1 } }; + // get property set info + Reference< XPropertySetInfo > xInfo( rPropSet->getPropertySetInfo(), UNO_SET_THROW ); + bool bAutomatic = false; if( ((SvXMLStylesContext *)GetStyles())->IsAutomaticStyle() && ( GetFamily() == XML_STYLE_FAMILY_TEXT_TEXT || GetFamily() == XML_STYLE_FAMILY_TEXT_PARAGRAPH ) ) @@ -476,11 +474,15 @@ void XMLTextStyleContext::FillPropertySet( OUString( RTL_CONSTASCII_USTRINGPARAM("ParaAutoStyleName") ); try { - rPropSet->setPropertyValue( sAutoProp, makeAny(GetAutoName()) ); + if ( xInfo->hasPropertyByName( sAutoProp ) ) + rPropSet->setPropertyValue( sAutoProp, makeAny(GetAutoName()) ); + else + bAutomatic = false; } catch( const RuntimeException& ) { throw; } catch( const Exception& ) { + DBG_UNHANDLED_EXCEPTION(); bAutomatic = false; } } @@ -499,9 +501,6 @@ void XMLTextStyleContext::FillPropertySet( bHasCombinedCharactersLetter = bVal; } - // get property set info - Reference< XPropertySetInfo > xInfo; - // keep-together: the application default is different from // the file format default. Hence, if we always set this // value; if we didn't find one, we'll set to false, the file @@ -534,9 +533,6 @@ void XMLTextStyleContext::FillPropertySet( // check for StarBats and StarMath fonts - if (!xInfo.is()) - xInfo.set(rPropSet->getPropertySetInfo()); - // iterate over aContextIDs entries 3..6 for ( sal_Int32 i = 3; i < 7; i++ ) { @@ -572,8 +568,6 @@ void XMLTextStyleContext::FillPropertySet( // set property OUString rPropertyName( rPropMapper->GetEntryAPIName(nMapperIndex) ); - if( !xInfo.is() ) - xInfo = rPropSet->getPropertySetInfo(); if ( xInfo->hasPropertyByName( rPropertyName ) ) { rPropSet->setPropertyValue( rPropertyName, aAny ); |