summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2007-04-16 15:38:44 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2007-04-16 15:38:44 +0000
commit746822de90bd610a5507dc5c5c85a92bc59d13f5 (patch)
treee6c699b04212ffea29473051a0fa74fd37b10058 /framework
parente250fbd3b8af5c836363d560ce41784015b2d7ee (diff)
INTEGRATION: CWS fwkdbdesign01 (1.34.84); FILE MERGED
2007/03/29 06:26:44 as 1.34.84.2: #i75596#, #i75591# let close dispatcher decide which frame will be closed 2007/02/14 14:26:23 as 1.34.84.1: #i74541# new API (and some small code changes) to support real sub frames greater level 1
Diffstat (limited to 'framework')
-rw-r--r--framework/source/dispatch/dispatchprovider.cxx59
1 files changed, 26 insertions, 33 deletions
diff --git a/framework/source/dispatch/dispatchprovider.cxx b/framework/source/dispatch/dispatchprovider.cxx
index b79342bccfbc..6dbc6e980062 100644
--- a/framework/source/dispatch/dispatchprovider.cxx
+++ b/framework/source/dispatch/dispatchprovider.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: dispatchprovider.cxx,v $
*
- * $Revision: 1.34 $
+ * $Revision: 1.35 $
*
- * last change: $Author: obo $ $Date: 2006-09-16 13:53:53 $
+ * last change: $Author: ihi $ $Date: 2007-04-16 16:38:44 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -411,14 +411,6 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_queryFrame
::rtl::OUString sTargetName = sTargetFrameName;
- if (
- (aURL.Complete.equalsAscii(".uno:CloseDoc")) ||
- (aURL.Complete.equalsAscii(".uno:CloseWin"))
- )
- {
- sTargetName = SPECIALTARGET_TOP;
- }
-
//-----------------------------------------------------------------------------------------------------
// I) handle special cases which not right for using findFrame() first
//-----------------------------------------------------------------------------------------------------
@@ -517,22 +509,10 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_queryFrame
{
if (xFrame->isTop())
{
- // There exist a hard coded interception for special URLs.
- if (
- (aURL.Complete.equalsAscii(".uno:CloseDoc" )) ||
- (aURL.Complete.equalsAscii(".uno:CloseWin" )) ||
- (aURL.Complete.equalsAscii(".uno:CloseFrame"))
- )
- {
- xDispatcher = implts_getOrCreateDispatchHelper( E_CLOSEDISPATCHER, xFrame );
- }
- else
- {
- // If we are this top frame itself (means our owner frame)
- // we should call ourself recursiv with a better target "_self".
- // So we can share the same code! (see reaction for "_self" inside this methode too.)
- xDispatcher = this->queryDispatch(aURL,SPECIALTARGET_SELF,0);
- }
+ // If we are this top frame itself (means our owner frame)
+ // we should call ourself recursiv with a better target "_self".
+ // So we can share the same code! (see reaction for "_self" inside this method too.)
+ xDispatcher = this->queryDispatch(aURL,SPECIALTARGET_SELF,0);
}
else
{
@@ -557,12 +537,25 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_queryFrame
(sTargetName.getLength()<1 )
)
{
- // Ask our controller for his agreement for these dispatched URL ...
- // because some URLs are internal and can be handled faster by SFX - which most is the current controller!
- // But in case of e.g. the bibliography not all queries will be handled successfully here.
- css::uno::Reference< css::frame::XDispatchProvider > xController( xFrame->getController(), css::uno::UNO_QUERY );
- if (xController.is())
- xDispatcher = xController->queryDispatch(aURL, SPECIALTARGET_SELF, 0);
+ // There exist a hard coded interception for special URLs.
+ if (
+ (aURL.Complete.equalsAscii(".uno:CloseDoc" )) ||
+ (aURL.Complete.equalsAscii(".uno:CloseWin" )) ||
+ (aURL.Complete.equalsAscii(".uno:CloseFrame"))
+ )
+ {
+ xDispatcher = implts_getOrCreateDispatchHelper( E_CLOSEDISPATCHER, xFrame );
+ }
+
+ if ( ! xDispatcher.is())
+ {
+ // Ask our controller for his agreement for these dispatched URL ...
+ // because some URLs are internal and can be handled faster by SFX - which most is the current controller!
+ // But in case of e.g. the bibliography not all queries will be handled successfully here.
+ css::uno::Reference< css::frame::XDispatchProvider > xController( xFrame->getController(), css::uno::UNO_QUERY );
+ if (xController.is())
+ xDispatcher = xController->queryDispatch(aURL, SPECIALTARGET_SELF, 0);
+ }
// If controller has no fun to dispatch these URL - we must search another right dispatcher.
// Search for any registered protocol handler first.
@@ -813,7 +806,7 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_getOrCreat
case E_CLOSEDISPATCHER :
{
- CloseDispatcher* pDispatcher = new CloseDispatcher( xFactory, xOwner );
+ CloseDispatcher* pDispatcher = new CloseDispatcher( xFactory, xOwner, sTarget );
xDispatchHelper = css::uno::Reference< css::frame::XDispatch >( static_cast< ::cppu::OWeakObject* >(pDispatcher), css::uno::UNO_QUERY );
}
break;