Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
db0f0516
Kaydet (Commit)
db0f0516
authored
Ara 14, 2000
tarafından
Christian Lippka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#81919# be aware of localy cached components
üst
56bba1cd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
34 deletions
+42
-34
hldoctp.cxx
svx/source/dialog/hldoctp.cxx
+42
-34
No files found.
svx/source/dialog/hldoctp.cxx
Dosyayı görüntüle @
db0f0516
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: hldoctp.cxx,v $
* $RCSfile: hldoctp.cxx,v $
*
*
* $Revision: 1.
3
$
* $Revision: 1.
4
$
*
*
* last change: $Author:
pw $ $Date: 2000-11-22 13:38:19
$
* last change: $Author:
cl $ $Date: 2000-12-14 18:06:42
$
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -61,11 +61,16 @@
...
@@ -61,11 +61,16 @@
#include "hyperdlg.hxx"
#include "hyperdlg.hxx"
#ifndef _UNOTOOLS_LOCALFILEHELPER_HXX
#include <unotools/localfilehelper.hxx>
#endif
#include "hldoctp.hxx"
#include "hldoctp.hxx"
#include "hyperdlg.hrc"
#include "hyperdlg.hrc"
sal_Char
__READONLY_DATA
sHash
[]
=
"#"
;
sal_Char
__READONLY_DATA
sHash
[]
=
"#"
;
sal_Char
__READONLY_DATA
sFileScheme
[]
=
INET_FILE_SCHEME
;
sal_Char
__READONLY_DATA
sFileScheme
[]
=
INET_FILE_SCHEME
;
sal_Char
__READONLY_DATA
sPortalFileScheme
[]
=
"vnd.sun.star.wfs://"
;
sal_Char
__READONLY_DATA
sNewsSRVScheme
[]
=
INET_NEWS_SRV_SCHEME
;
sal_Char
__READONLY_DATA
sNewsSRVScheme
[]
=
INET_NEWS_SRV_SCHEME
;
sal_Char
__READONLY_DATA
sHTTPScheme
[]
=
INET_HTTP_SCHEME
;
sal_Char
__READONLY_DATA
sHTTPScheme
[]
=
INET_HTTP_SCHEME
;
...
@@ -96,6 +101,8 @@ SvxHyperlinkDocTp::SvxHyperlinkDocTp ( Window *pParent, const SfxItemSet& rItemS
...
@@ -96,6 +101,8 @@ SvxHyperlinkDocTp::SvxHyperlinkDocTp ( Window *pParent, const SfxItemSet& rItemS
maCbbPath
.
SetPosSizePixel
(
LogicToPixel
(
Point
(
54
,
15
),
MAP_APPFONT
),
maCbbPath
.
SetPosSizePixel
(
LogicToPixel
(
Point
(
54
,
15
),
MAP_APPFONT
),
LogicToPixel
(
Size
(
176
,
60
),
MAP_APPFONT
)
);
LogicToPixel
(
Size
(
176
,
60
),
MAP_APPFONT
)
);
maCbbPath
.
Show
();
maCbbPath
.
Show
();
String
aFileScheme
(
INET_FILE_SCHEME
,
RTL_TEXTENCODING_ASCII_US
);
maCbbPath
.
SetBaseURL
(
aFileScheme
);
maCbbPath
.
SetHelpId
(
HID_HYPERDLG_DOC_PATH
);
maCbbPath
.
SetHelpId
(
HID_HYPERDLG_DOC_PATH
);
SetExchangeSupport
();
SetExchangeSupport
();
...
@@ -131,6 +138,7 @@ void SvxHyperlinkDocTp::FillDlgFields ( String& aStrURL )
...
@@ -131,6 +138,7 @@ void SvxHyperlinkDocTp::FillDlgFields ( String& aStrURL )
switch
(
aProtocol
)
switch
(
aProtocol
)
{
{
case
INET_PROT_FILE
:
case
INET_PROT_FILE
:
case
INET_PROT_VND_SUN_STAR_WFS
:
aStrScheme
.
AssignAscii
(
RTL_CONSTASCII_STRINGPARAM
(
sFileScheme
)
);
aStrScheme
.
AssignAscii
(
RTL_CONSTASCII_STRINGPARAM
(
sFileScheme
)
);
break
;
break
;
case
INET_PROT_POP3
:
case
INET_PROT_POP3
:
...
@@ -181,27 +189,24 @@ void SvxHyperlinkDocTp::FillDlgFields ( String& aStrURL )
...
@@ -181,27 +189,24 @@ void SvxHyperlinkDocTp::FillDlgFields ( String& aStrURL )
String
SvxHyperlinkDocTp
::
GetCurrentURL
()
String
SvxHyperlinkDocTp
::
GetCurrentURL
()
{
{
// get data from dialog-controls
// get data from dialog-controls
String
aStrURL
(
maCbbPath
.
GetText
()
);
String
aStrURL
;
String
aStrPath
(
maCbbPath
.
GetText
()
);
const
String
aBaseURL
(
maCbbPath
.
GetBaseURL
()
);
String
aStrMark
(
maEdTarget
.
GetText
()
);
String
aStrMark
(
maEdTarget
.
GetText
()
);
if
(
aStr
URL
!=
aEmptyStr
)
if
(
aStr
Path
!=
aEmptyStr
)
{
{
// create a real URL-String
utl
::
LocalFileHelper
::
ConvertSystemPathToURL
(
aStrPath
,
aBaseURL
,
aStrURL
);
if
(
aStrMark
!=
aEmptyStr
)
if
(
aStrMark
!=
aEmptyStr
)
{
{
aStrURL
.
AppendAscii
(
"#"
);
aStrURL
.
AppendAscii
(
"#"
);
aStrURL
+=
aStrMark
;
aStrURL
+=
aStrMark
;
}
}
// create a real URL-String
INetURLObject
aURL
;
if
(
aURL
.
GetProtocol
()
==
INET_PROT_NOT_VALID
)
aURL
.
SetSmartProtocol
(
INET_PROT_FILE
);
aURL
.
SetSmartURL
(
aStrURL
);
// if there is a empty string, the url will be the html-scheme
// if there is a empty string, the url will be the html-scheme
// but its better to show only the file-scheme
// but its better to show only the file-scheme
aStrURL
=
aURL
.
GetMainURL
();
if
(
aStrURL
.
SearchAscii
(
sHTTPScheme
)
==
0
)
if
(
aStrURL
.
SearchAscii
(
sHTTPScheme
)
==
0
)
{
{
...
@@ -235,7 +240,8 @@ void SvxHyperlinkDocTp::GetCurentItemData ( String& aStrURL, String& aStrName,
...
@@ -235,7 +240,8 @@ void SvxHyperlinkDocTp::GetCurentItemData ( String& aStrURL, String& aStrName,
// get data from standard-fields
// get data from standard-fields
aStrURL
=
GetCurrentURL
();
aStrURL
=
GetCurrentURL
();
if
(
aStrURL
.
EqualsIgnoreCaseAscii
(
sFileScheme
)
)
if
(
aStrURL
.
EqualsIgnoreCaseAscii
(
sFileScheme
)
||
aStrURL
.
EqualsIgnoreCaseAscii
(
sPortalFileScheme
)
)
aStrURL
=
aEmptyStr
;
aStrURL
=
aEmptyStr
;
aStrIntName
=
mpEdText
->
GetText
();
aStrIntName
=
mpEdText
->
GetText
();
...
@@ -385,30 +391,26 @@ IMPL_LINK ( SvxHyperlinkDocTp, ClickFileopenHdl_Impl, void *, EMPTYARG )
...
@@ -385,30 +391,26 @@ IMPL_LINK ( SvxHyperlinkDocTp, ClickFileopenHdl_Impl, void *, EMPTYARG )
// Open Fileopen-Dialog
// Open Fileopen-Dialog
SfxFileDialog
*
pFileDlg
=
SFX_APP
()
->
CreateDocFileDialog
(
(
WB_3DLOOK
|
WB_STDMODAL
|
WB_OPEN
),
SfxFileDialog
*
pFileDlg
=
SFX_APP
()
->
CreateDocFileDialog
(
(
WB_3DLOOK
|
WB_STDMODAL
|
WB_OPEN
),
*
(
SfxObjectFactory
*
)
NULL
);
*
(
SfxObjectFactory
*
)
NULL
);
INetURLObject
aOldURL
(
GetCurrentURL
(),
INET_PROT_FILE
);
String
aOldURL
(
GetCurrentURL
()
);
if
(
!
aOldURL
.
GetMainURL
().
EqualsIgnoreCaseAscii
(
sFileScheme
)
)
if
(
aOldURL
.
EqualsIgnoreCaseAscii
(
sFileScheme
,
0
,
sizeof
(
sFileScheme
)
-
1
)
||
aOldURL
.
EqualsIgnoreCaseAscii
(
sPortalFileScheme
,
0
,
sizeof
(
sFileScheme
)
-
1
)
)
{
{
pFileDlg
->
SetPathURL
(
aOldURL
.
GetMainURL
()
);
pFileDlg
->
SetPathURL
(
aOldURL
);
}
}
if
(
pFileDlg
)
if
(
pFileDlg
)
{
{
if
(
pFileDlg
->
Execute
()
==
RET_OK
)
if
(
pFileDlg
->
Execute
()
==
RET_OK
)
{
{
String
a
StrFilename
(
pFileDlg
->
GetPath
()
);
String
a
URL
(
pFileDlg
->
GetPath
()
);
aStrFilename
=
aStrFilename
.
EraseLeadingChars
()
;
String
aPath
;
sal_Char
const
sFile
[]
=
"file"
;
utl
::
LocalFileHelper
::
ConvertURLToSystemPath
(
aURL
,
aPath
);
if
(
aStrFilename
.
SearchAscii
(
sFile
)
==
0
)
{
INetURLObject
aURL
;
aURL
.
SetSmartProtocol
(
INET_PROT_FILE
);
aURL
.
SetSmartURL
(
aStrFilename
);
maCbbPath
.
SetText
(
aURL
.
GetFull
()
);
maCbbPath
.
SetBaseURL
(
aURL
);
}
maCbbPath
.
SetText
(
aPath
);
if
(
aOldURL
.
GetMainURL
()
!=
GetCurrentURL
()
)
if
(
aOldURL
!=
GetCurrentURL
()
)
ModifiedPathHdl_Impl
(
NULL
);
ModifiedPathHdl_Impl
(
NULL
);
}
}
...
@@ -429,13 +431,15 @@ IMPL_LINK ( SvxHyperlinkDocTp, ClickTargetHdl_Impl, void *, EMPTYARG )
...
@@ -429,13 +431,15 @@ IMPL_LINK ( SvxHyperlinkDocTp, ClickTargetHdl_Impl, void *, EMPTYARG )
if
(
GetPathType
(
maStrURL
)
==
Type_ExistsFile
||
if
(
GetPathType
(
maStrURL
)
==
Type_ExistsFile
||
maStrURL
==
aEmptyStr
||
maStrURL
==
aEmptyStr
||
maStrURL
.
EqualsIgnoreCaseAscii
(
sFileScheme
)
||
maStrURL
.
EqualsIgnoreCaseAscii
(
sFileScheme
)
||
maStrURL
.
EqualsIgnoreCaseAscii
(
sPortalFileScheme
)
||
maStrURL
.
SearchAscii
(
sHash
)
==
0
)
maStrURL
.
SearchAscii
(
sHash
)
==
0
)
{
{
mpMarkWnd
->
SetError
(
LERR_NOERROR
);
mpMarkWnd
->
SetError
(
LERR_NOERROR
);
EnterWait
();
EnterWait
();
if
(
maStrURL
.
EqualsIgnoreCaseAscii
(
sFileScheme
)
)
if
(
maStrURL
.
EqualsIgnoreCaseAscii
(
sFileScheme
)
||
maStrURL
.
EqualsIgnoreCaseAscii
(
sPortalFileScheme
)
)
mpMarkWnd
->
RefreshTree
(
aEmptyStr
);
mpMarkWnd
->
RefreshTree
(
aEmptyStr
);
else
else
mpMarkWnd
->
RefreshTree
(
maStrURL
);
mpMarkWnd
->
RefreshTree
(
maStrURL
);
...
@@ -465,7 +469,8 @@ IMPL_LINK ( SvxHyperlinkDocTp, ModifiedPathHdl_Impl, void *, EMPTYARG )
...
@@ -465,7 +469,8 @@ IMPL_LINK ( SvxHyperlinkDocTp, ModifiedPathHdl_Impl, void *, EMPTYARG )
maFtFullURL
.
SetText
(
maStrURL
);
maFtFullURL
.
SetText
(
maStrURL
);
if
(
mbNewName
&&
!
maStrURL
.
EqualsIgnoreCaseAscii
(
sFileScheme
)
)
if
(
mbNewName
&&
!
maStrURL
.
EqualsIgnoreCaseAscii
(
sFileScheme
)
&&
!
maStrURL
.
EqualsIgnoreCaseAscii
(
sPortalFileScheme
)
)
mpEdIndication
->
SetText
(
maFtFullURL
.
GetText
()
);
mpEdIndication
->
SetText
(
maFtFullURL
.
GetText
()
);
return
(
0L
);
return
(
0L
);
...
@@ -485,7 +490,8 @@ IMPL_LINK ( SvxHyperlinkDocTp, TimeoutHdl_Impl, Timer *, EMPTYARG )
...
@@ -485,7 +490,8 @@ IMPL_LINK ( SvxHyperlinkDocTp, TimeoutHdl_Impl, Timer *, EMPTYARG )
{
{
EnterWait
();
EnterWait
();
if
(
maStrURL
.
EqualsIgnoreCaseAscii
(
sFileScheme
)
)
if
(
maStrURL
.
EqualsIgnoreCaseAscii
(
sFileScheme
)
||
maStrURL
.
EqualsIgnoreCaseAscii
(
sPortalFileScheme
)
)
mpMarkWnd
->
RefreshTree
(
aEmptyStr
);
mpMarkWnd
->
RefreshTree
(
aEmptyStr
);
else
else
mpMarkWnd
->
RefreshTree
(
maStrURL
);
mpMarkWnd
->
RefreshTree
(
maStrURL
);
...
@@ -511,7 +517,8 @@ IMPL_LINK ( SvxHyperlinkDocTp, ModifiedTargetHdl_Impl, void *, EMPTYARG )
...
@@ -511,7 +517,8 @@ IMPL_LINK ( SvxHyperlinkDocTp, ModifiedTargetHdl_Impl, void *, EMPTYARG )
maFtFullURL
.
SetText
(
maStrURL
);
maFtFullURL
.
SetText
(
maStrURL
);
if
(
mbNewName
&&
!
maStrURL
.
EqualsIgnoreCaseAscii
(
sFileScheme
)
)
if
(
mbNewName
&&
!
maStrURL
.
EqualsIgnoreCaseAscii
(
sFileScheme
)
&&
!
maStrURL
.
EqualsIgnoreCaseAscii
(
sFileScheme
)
)
mpEdIndication
->
SetText
(
maFtFullURL
.
GetText
()
);
mpEdIndication
->
SetText
(
maFtFullURL
.
GetText
()
);
return
(
0L
);
return
(
0L
);
...
@@ -529,7 +536,8 @@ IMPL_LINK ( SvxHyperlinkDocTp, LostFocusPathHdl_Impl, void *, EMPTYARG )
...
@@ -529,7 +536,8 @@ IMPL_LINK ( SvxHyperlinkDocTp, LostFocusPathHdl_Impl, void *, EMPTYARG )
maFtFullURL
.
SetText
(
maStrURL
);
maFtFullURL
.
SetText
(
maStrURL
);
if
(
mbNewName
&&
!
maStrURL
.
EqualsIgnoreCaseAscii
(
sFileScheme
)
)
if
(
mbNewName
&&
!
maStrURL
.
EqualsIgnoreCaseAscii
(
sFileScheme
)
&&
!
maStrURL
.
EqualsIgnoreCaseAscii
(
sPortalFileScheme
))
mpEdIndication
->
SetText
(
maFtFullURL
.
GetText
()
);
mpEdIndication
->
SetText
(
maFtFullURL
.
GetText
()
);
return
(
0L
);
return
(
0L
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment