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
3a5ae29f
Kaydet (Commit)
3a5ae29f
authored
Şub 22, 2013
tarafından
Ivan Timofeev
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
String -> OUString
Change-Id: I5b577a8e0675d7849ca22e24bb99ee2d8602ae6a
üst
f0cd6fe9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
27 deletions
+30
-27
sfxhelp.cxx
sfx2/source/appl/sfxhelp.cxx
+23
-20
helper.cxx
sfx2/source/bastyp/helper.cxx
+5
-5
helper.hxx
sfx2/source/inc/helper.hxx
+2
-2
No files found.
sfx2/source/appl/sfxhelp.cxx
Dosyayı görüntüle @
3a5ae29f
...
@@ -126,12 +126,12 @@ static OUString HelpLocaleString()
...
@@ -126,12 +126,12 @@ static OUString HelpLocaleString()
if
(
!
osl
::
DirectoryItem
::
get
(
sHelpPath
,
aDirItem
)
==
osl
::
FileBase
::
E_None
)
if
(
!
osl
::
DirectoryItem
::
get
(
sHelpPath
,
aDirItem
)
==
osl
::
FileBase
::
E_None
)
{
{
bOk
=
false
;
bOk
=
false
;
String
sLang
(
aLocaleStr
);
OU
String
sLang
(
aLocaleStr
);
xub_StrLen
nSepPos
=
sLang
.
Search
(
'-'
);
sal_Int32
nSepPos
=
sLang
.
indexOf
(
'-'
);
if
(
nSepPos
!=
STRING_NOTFOUND
)
if
(
nSepPos
!=
-
1
)
{
{
bOk
=
true
;
bOk
=
true
;
sLang
=
sLang
.
C
opy
(
0
,
nSepPos
);
sLang
=
sLang
.
c
opy
(
0
,
nSepPos
);
sHelpPath
=
aBaseInstallPath
+
sHelpPath
=
aBaseInstallPath
+
OUString
::
createFromAscii
(
szHelpPath
)
+
sLang
;
OUString
::
createFromAscii
(
szHelpPath
)
+
sLang
;
if
(
!
osl
::
DirectoryItem
::
get
(
sHelpPath
,
aDirItem
)
==
osl
::
FileBase
::
E_None
)
if
(
!
osl
::
DirectoryItem
::
get
(
sHelpPath
,
aDirItem
)
==
osl
::
FileBase
::
E_None
)
...
@@ -185,7 +185,7 @@ sal_Bool GetHelpAnchor_Impl( const OUString& _rURL, OUString& _rAnchor )
...
@@ -185,7 +185,7 @@ sal_Bool GetHelpAnchor_Impl( const OUString& _rURL, OUString& _rAnchor )
if
(
!
sAnchor
.
isEmpty
()
)
if
(
!
sAnchor
.
isEmpty
()
)
{
{
_rAnchor
=
String
(
sAnchor
)
;
_rAnchor
=
sAnchor
;
bRet
=
sal_True
;
bRet
=
sal_True
;
}
}
}
}
...
@@ -307,7 +307,7 @@ public:
...
@@ -307,7 +307,7 @@ public:
~
SfxHelp_Impl
();
~
SfxHelp_Impl
();
SfxHelpOptions_Impl
*
GetOptions
();
SfxHelpOptions_Impl
*
GetOptions
();
static
String
GetHelpText
(
const
OUString
&
aCommandURL
,
const
String
&
rModule
);
static
OUString
GetHelpText
(
const
OUString
&
aCommandURL
,
const
OU
String
&
rModule
);
};
};
SfxHelp_Impl
::
SfxHelp_Impl
()
:
SfxHelp_Impl
::
SfxHelp_Impl
()
:
...
@@ -322,14 +322,17 @@ SfxHelp_Impl::~SfxHelp_Impl()
...
@@ -322,14 +322,17 @@ SfxHelp_Impl::~SfxHelp_Impl()
delete
m_pOpt
;
delete
m_pOpt
;
}
}
String
SfxHelp_Impl
::
GetHelpText
(
const
OUString
&
aCommandURL
,
const
String
&
rModule
)
OUString
SfxHelp_Impl
::
GetHelpText
(
const
OUString
&
aCommandURL
,
const
OU
String
&
rModule
)
{
{
// create help url
// create help url
String
aHelpURL
=
SfxHelp
::
CreateHelpURL
(
aCommandURL
,
rModule
);
OUStringBuffer
aHelpURL
(
SfxHelp
::
CreateHelpURL
(
aCommandURL
,
rModule
)
);
// added 'active' parameter
// added 'active' parameter
aHelpURL
.
Insert
(
String
(
"&Active=true"
),
aHelpURL
.
SearchBackward
(
'#'
)
);
sal_Int32
nIndex
=
aHelpURL
.
lastIndexOf
(
'#'
);
if
(
nIndex
<
0
)
nIndex
=
aHelpURL
.
getLength
();
aHelpURL
.
insert
(
nIndex
,
"&Active=true"
);
// load help string
// load help string
return
SfxContentHelper
::
GetActiveHelpString
(
aHelpURL
);
return
SfxContentHelper
::
GetActiveHelpString
(
aHelpURL
.
makeStringAndClear
()
);
}
}
SfxHelpOptions_Impl
*
SfxHelp_Impl
::
GetOptions
()
SfxHelpOptions_Impl
*
SfxHelp_Impl
::
GetOptions
()
...
@@ -619,13 +622,13 @@ OUString SfxHelp::GetHelpText( const OUString& aCommandURL, const Window* pWindo
...
@@ -619,13 +622,13 @@ OUString SfxHelp::GetHelpText( const OUString& aCommandURL, const Window* pWindo
if
(
bIsDebug
)
if
(
bIsDebug
)
{
{
sHelpText
+=
"
\n
-------------
\n
"
;
sHelpText
+=
"
\n
-------------
\n
"
;
sHelpText
+=
String
(
sModuleName
)
;
sHelpText
+=
sModuleName
;
sHelpText
+=
": "
;
sHelpText
+=
": "
;
sHelpText
+=
aCommandURL
;
sHelpText
+=
aCommandURL
;
if
(
!
aNewHelpId
.
isEmpty
()
)
if
(
!
aNewHelpId
.
isEmpty
()
)
{
{
sHelpText
+=
" - "
;
sHelpText
+=
" - "
;
sHelpText
+=
String
(
OStringToOUString
(
aNewHelpId
,
RTL_TEXTENCODING_UTF8
)
);
sHelpText
+=
OStringToOUString
(
aNewHelpId
,
RTL_TEXTENCODING_UTF8
);
}
}
}
}
...
@@ -644,7 +647,7 @@ static bool impl_hasHelpInstalled( const OUString &rLang = OUString() )
...
@@ -644,7 +647,7 @@ static bool impl_hasHelpInstalled( const OUString &rLang = OUString() )
sal_Bool
SfxHelp
::
SearchKeyword
(
const
OUString
&
rKeyword
)
sal_Bool
SfxHelp
::
SearchKeyword
(
const
OUString
&
rKeyword
)
{
{
return
Start_Impl
(
String
(),
NULL
,
rKeyword
);
return
Start_Impl
(
OU
String
(),
NULL
,
rKeyword
);
}
}
sal_Bool
SfxHelp
::
Start
(
const
OUString
&
rURL
,
const
Window
*
pWindow
)
sal_Bool
SfxHelp
::
Start
(
const
OUString
&
rURL
,
const
Window
*
pWindow
)
...
@@ -653,14 +656,14 @@ sal_Bool SfxHelp::Start( const OUString& rURL, const Window* pWindow )
...
@@ -653,14 +656,14 @@ sal_Bool SfxHelp::Start( const OUString& rURL, const Window* pWindow )
}
}
/// Redirect the vnd.sun.star.help:// urls to http://help.libreoffice.org
/// Redirect the vnd.sun.star.help:// urls to http://help.libreoffice.org
static
bool
impl_showOnlineHelp
(
const
String
&
rURL
)
static
bool
impl_showOnlineHelp
(
const
OU
String
&
rURL
)
{
{
String
aInternal
(
"vnd.sun.star.help://"
);
OU
String
aInternal
(
"vnd.sun.star.help://"
);
if
(
rURL
.
Len
()
<=
aInternal
.
Len
()
||
rURL
.
Copy
(
0
,
aInternal
.
Len
()
)
!=
aInternal
)
if
(
rURL
.
getLength
()
<=
aInternal
.
getLength
()
||
!
rURL
.
startsWith
(
aInternal
)
)
return
false
;
return
false
;
OUString
aHelpLink
(
"http://help.libreoffice.org/"
);
OUString
aHelpLink
(
"http://help.libreoffice.org/"
);
aHelpLink
+=
rURL
.
Copy
(
aInternal
.
Len
()
);
aHelpLink
+=
rURL
.
copy
(
aInternal
.
getLength
()
);
try
try
{
{
Reference
<
XSystemShellExecute
>
xSystemShell
(
Reference
<
XSystemShellExecute
>
xSystemShell
(
...
@@ -692,10 +695,10 @@ sal_Bool SfxHelp::Start_Impl(const OUString& rURL, const Window* pWindow, const
...
@@ -692,10 +695,10 @@ sal_Bool SfxHelp::Start_Impl(const OUString& rURL, const Window* pWindow, const
Help keyword search now is implemented as own method; in former versions it
Help keyword search now is implemented as own method; in former versions it
was done via Help::Start, but this implementation conflicted with the upward search.
was done via Help::Start, but this implementation conflicted with the upward search.
*/
*/
String
aHelpURL
;
OU
String
aHelpURL
;
INetURLObject
aParser
(
rURL
);
INetURLObject
aParser
(
rURL
);
INetProtocol
nProtocol
=
aParser
.
GetProtocol
();
INetProtocol
nProtocol
=
aParser
.
GetProtocol
();
String
aHelpModuleName
(
GetHelpModuleName_Impl
()
);
OU
String
aHelpModuleName
(
GetHelpModuleName_Impl
()
);
switch
(
nProtocol
)
switch
(
nProtocol
)
{
{
...
@@ -727,7 +730,7 @@ sal_Bool SfxHelp::Start_Impl(const OUString& rURL, const Window* pWindow, const
...
@@ -727,7 +730,7 @@ sal_Bool SfxHelp::Start_Impl(const OUString& rURL, const Window* pWindow, const
if
(
!
pParent
)
if
(
!
pParent
)
{
{
// create help url of start page ( helpid == 0 -> start page)
// create help url of start page ( helpid == 0 -> start page)
aHelpURL
=
CreateHelpURL
(
String
(),
aHelpModuleName
);
aHelpURL
=
CreateHelpURL
(
OU
String
(),
aHelpModuleName
);
}
}
else
if
(
pParent
->
IsDialog
()
&&
!
bTriedTabPage
)
else
if
(
pParent
->
IsDialog
()
&&
!
bTriedTabPage
)
{
{
...
...
sfx2/source/bastyp/helper.cxx
Dosyayı görüntüle @
3a5ae29f
...
@@ -248,9 +248,9 @@ uno::Sequence< OUString > SfxContentHelper::GetHelpTreeViewContents( const Strin
...
@@ -248,9 +248,9 @@ uno::Sequence< OUString > SfxContentHelper::GetHelpTreeViewContents( const Strin
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
String
SfxContentHelper
::
GetActiveHelpString
(
const
String
&
rURL
)
OUString
SfxContentHelper
::
GetActiveHelpString
(
const
OU
String
&
rURL
)
{
{
String
aRet
;
OUStringBuffer
aRet
;
try
try
{
{
uno
::
Reference
<
uno
::
XComponentContext
>
xContext
=
::
comphelper
::
getProcessComponentContext
();
uno
::
Reference
<
uno
::
XComponentContext
>
xContext
=
::
comphelper
::
getProcessComponentContext
();
...
@@ -268,7 +268,7 @@ String SfxContentHelper::GetActiveHelpString( const String& rURL )
...
@@ -268,7 +268,7 @@ String SfxContentHelper::GetActiveHelpString( const String& rURL )
for
(
sal_Int32
i
=
0
;
i
<
nRead
;
++
i
)
for
(
sal_Int32
i
=
0
;
i
<
nRead
;
++
i
)
sBuffer
.
append
(
(
sal_Char
)
lData
[
i
]
);
sBuffer
.
append
(
(
sal_Char
)
lData
[
i
]
);
OUString
sString
=
OStringToOUString
(
sBuffer
.
makeStringAndClear
(),
RTL_TEXTENCODING_UTF8
);
OUString
sString
=
OStringToOUString
(
sBuffer
.
makeStringAndClear
(),
RTL_TEXTENCODING_UTF8
);
aRet
+=
String
(
sString
);
aRet
.
append
(
sString
);
nRead
=
xStream
->
readBytes
(
lData
,
1024
);
nRead
=
xStream
->
readBytes
(
lData
,
1024
);
}
}
...
@@ -277,12 +277,12 @@ String SfxContentHelper::GetActiveHelpString( const String& rURL )
...
@@ -277,12 +277,12 @@ String SfxContentHelper::GetActiveHelpString( const String& rURL )
{
{
}
}
return
aRet
;
return
aRet
.
makeStringAndClear
()
;
}
}
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
sal_Bool
SfxContentHelper
::
IsHelpErrorDocument
(
const
String
&
rURL
)
sal_Bool
SfxContentHelper
::
IsHelpErrorDocument
(
const
OU
String
&
rURL
)
{
{
sal_Bool
bRet
=
sal_False
;
sal_Bool
bRet
=
sal_False
;
try
try
...
...
sfx2/source/inc/helper.hxx
Dosyayı görüntüle @
3a5ae29f
...
@@ -34,8 +34,8 @@ public:
...
@@ -34,8 +34,8 @@ public:
GetResultSet
(
const
String
&
rURL
);
GetResultSet
(
const
String
&
rURL
);
static
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
rtl
::
OUString
>
static
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
rtl
::
OUString
>
GetHelpTreeViewContents
(
const
String
&
rURL
);
GetHelpTreeViewContents
(
const
String
&
rURL
);
static
String
GetActiveHelpString
(
const
String
&
rURL
);
static
OUString
GetActiveHelpString
(
const
OU
String
&
rURL
);
static
sal_Bool
IsHelpErrorDocument
(
const
String
&
rURL
);
static
sal_Bool
IsHelpErrorDocument
(
const
OU
String
&
rURL
);
static
sal_uIntPtr
GetSize
(
const
String
&
rContent
);
static
sal_uIntPtr
GetSize
(
const
String
&
rContent
);
};
};
...
...
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