summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorAndreas Schlüns <as@openoffice.org>2002-09-13 05:41:14 +0000
committerAndreas Schlüns <as@openoffice.org>2002-09-13 05:41:14 +0000
commit3cda853919d75b181b30282b29e353c1087b6e64 (patch)
tree442b5f96d56df97c806b82563545626cf1f38f5e /sfx2
parente4f5f50b9d0a7ccf6e1cba1dacb5359e71aac66e (diff)
#101628# new slot and functionality for SID_OPENHYPERLINK
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/sdi/docslots.sdi7
-rw-r--r--sfx2/sdi/sfx.sdi25
-rw-r--r--sfx2/source/appl/appopen.cxx36
3 files changed, 57 insertions, 11 deletions
diff --git a/sfx2/sdi/docslots.sdi b/sfx2/sdi/docslots.sdi
index 672ad6a27d41..f6c6531b0cf5 100644
--- a/sfx2/sdi/docslots.sdi
+++ b/sfx2/sdi/docslots.sdi
@@ -2,7 +2,7 @@
shell SfxObjectShell
(C) 1994-1995 StarDivision GmbH, Hamburg, Germany
- $Author: cd $ $Date: 2002-08-26 07:29:54 $ $Revision: 1.7 $
+ $Author: as $ $Date: 2002-09-13 06:40:54 $ $Revision: 1.8 $
$Logfile: T:/sfx2/sdi/docslots.sdv $ $Workfile: DOCSLOTS.SDI $
=========================================================================*/
@@ -22,6 +22,11 @@ interface Documents
ExecMethod = OpenDocExec_Impl ;
]
//---------------------------------------------------------------------
+ SID_OPENHYPERLINK // ole(no) api(final/play/rec)
+ [
+ ExecMethod = OpenDocExec_Impl ;
+ ]
+ //---------------------------------------------------------------------
SID_OPENURL // ole(no) api(no)
[
ExecMethod = OpenDocExec_Impl ;
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index a07891d5641e..99315d5f36ab 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -5870,6 +5870,31 @@ SfxObjectItem Open SID_OPENDOC
]
//--------------------------------------------------------------------------
+SfxObjectItem OpenHyperlink SID_OPENHYPERLINK
+(SfxStringItem URL SID_FILE_NAME,SfxStringItem FilterName SID_FILTER_NAME,SfxStringItem OpenFlags SID_OPTIONS,SfxStringItem Password SID_PASSWORD,SfxStringItem FilterOptions SID_FILE_FILTEROPTIONS,SfxInt16Item Version SID_VERSION,SfxStringItem Referer SID_REFERER)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
SfxStringItem DocInfoTitle SID_DOCINFO_TITLE
[
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 836d2e355cba..071e48759a2f 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: appopen.cxx,v $
*
- * $Revision: 1.58 $
+ * $Revision: 1.59 $
*
- * last change: $Author: mav $ $Date: 2002-09-12 10:54:38 $
+ * last change: $Author: as $ $Date: 2002-09-13 06:41:14 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1026,6 +1026,8 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
}
}
+ BOOL bHyperlinkUsed = FALSE;
+
if ( SID_OPENURL == nSID )
{
// SID_OPENURL does the same as SID_OPENDOC!
@@ -1036,15 +1038,29 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
{
rReq.AppendItem( SfxBoolItem( SID_TEMPLATE, FALSE ) );
}
+ // pass URL to OS by using ShellExecuter or open it internal
+ // if it seams to be an own format.
+ /* Attention!
+ There exist two possibilities to open hyperlinks:
+ a) using SID_OPENHYPERLINK (new)
+ b) using SID_BROWSE (old)
+ */
+ else if ( nSID == SID_OPENHYPERLINK )
+ {
+ rReq.SetSlot( SID_OPENDOC );
+ nSID = SID_OPENDOC;
+ bHyperlinkUsed = TRUE;
+ }
- // pass URL to OS by using ShellExecuter
- BOOL bHyperlinkUsed = FALSE;
- SFX_REQUEST_ARG(rReq, pHyperLinkUsedItem, SfxBoolItem, SID_BROWSE, FALSE);
- if ( pHyperLinkUsedItem )
- bHyperlinkUsed = pHyperLinkUsedItem->GetValue();
-
- // no "official" item, so remove it from ItemSet before using UNO-API
- rReq.RemoveItem( SID_BROWSE );
+ // no else here! It's optional ...
+ if (!bHyperlinkUsed)
+ {
+ SFX_REQUEST_ARG(rReq, pHyperLinkUsedItem, SfxBoolItem, SID_BROWSE, FALSE);
+ if ( pHyperLinkUsedItem )
+ bHyperlinkUsed = pHyperLinkUsedItem->GetValue();
+ // no "official" item, so remove it from ItemSet before using UNO-API
+ rReq.RemoveItem( SID_BROWSE );
+ }
SFX_REQUEST_ARG( rReq, pFileName, SfxStringItem, SID_FILE_NAME, FALSE );
String aFileName = pFileName->GetValue();