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
2727a29e
Kaydet (Commit)
2727a29e
authored
Ock 24, 2012
tarafından
Olivier Hallot
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix for fdo43460 Part XLVI getLength() to isEmpty()
Part XLVI Modules xmlhelp
üst
116f3f2e
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
42 additions
and
45 deletions
+42
-45
databases.cxx
xmlhelp/source/cxxhelp/provider/databases.cxx
+13
-15
provider.cxx
xmlhelp/source/cxxhelp/provider/provider.cxx
+1
-1
resultsetbase.cxx
xmlhelp/source/cxxhelp/provider/resultsetbase.cxx
+1
-1
resultsetforquery.cxx
xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
+2
-2
urlparameter.cxx
xmlhelp/source/cxxhelp/provider/urlparameter.cxx
+12
-12
urlparameter.hxx
xmlhelp/source/cxxhelp/provider/urlparameter.hxx
+6
-6
tvfactory.cxx
xmlhelp/source/treeview/tvfactory.cxx
+1
-1
tvread.cxx
xmlhelp/source/treeview/tvread.cxx
+6
-7
No files found.
xmlhelp/source/cxxhelp/provider/databases.cxx
Dosyayı görüntüle @
2727a29e
...
...
@@ -243,7 +243,7 @@ static bool impl_getZipFile(
for
(
int
i
=
0
;
i
<
rImagesZipPaths
.
getLength
();
++
i
)
{
rtl
::
OUString
aFileName
=
pPathArray
[
i
];
if
(
aFileName
.
getLength
()
)
if
(
!
aFileName
.
isEmpty
()
)
{
if
(
1
+
aFileName
.
lastIndexOf
(
'/'
)
!=
aFileName
.
getLength
()
)
{
...
...
@@ -292,14 +292,14 @@ rtl::OString Databases::getImagesZipFileURL()
bChanged
=
true
;
}
if
(
!
m_aImagesZipFileURL
.
getLength
()
||
bChanged
)
if
(
m_aImagesZipFileURL
.
isEmpty
()
||
bChanged
)
{
rtl
::
OUString
aImageZip
,
aSymbolsStyleName
;
aResult
=
xAccess
->
getByHierarchicalName
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"Misc/SymbolStyle"
)));
aResult
>>=
aSymbolsStyleName
;
bool
bFound
=
false
;
if
(
aSymbolsStyleName
.
getLength
()
!=
0
)
if
(
!
aSymbolsStyleName
.
isEmpty
()
)
{
rtl
::
OUString
aZipName
=
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"images_"
));
aZipName
+=
aSymbolsStyleName
;
...
...
@@ -594,7 +594,7 @@ Db* Databases::getBerkeley( const rtl::OUString& Database,
const
rtl
::
OUString
&
Language
,
bool
helpText
,
const
rtl
::
OUString
*
pExtensionPath
)
{
if
(
!
Database
.
getLength
()
||
!
Language
.
getLength
()
)
if
(
Database
.
isEmpty
()
||
Language
.
isEmpty
()
)
return
0
;
osl
::
MutexGuard
aGuard
(
m_aMutex
);
...
...
@@ -668,7 +668,7 @@ Databases::getCollator( const rtl::OUString& Language,
m_xContext
),
UNO_QUERY
);
rtl
::
OUString
langStr
=
processLang
(
Language
);
rtl
::
OUString
countryStr
=
country
(
Language
);
if
(
!
countryStr
.
getLength
()
)
if
(
countryStr
.
isEmpty
()
)
{
if
(
langStr
.
compareToAscii
(
"de"
)
==
0
)
countryStr
=
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"DE"
));
...
...
@@ -914,7 +914,7 @@ KeywordInfo* Databases::getKeyword( const rtl::OUString& Database,
KeyDataBaseFileIterator
aDbFileIt
(
m_xContext
,
*
this
,
Database
,
Language
);
rtl
::
OUString
fileURL
;
bool
bExtension
=
false
;
while
(
(
fileURL
=
aDbFileIt
.
nextDbFile
(
bExtension
)).
getLength
()
>
0
)
while
(
!
(
fileURL
=
aDbFileIt
.
nextDbFile
(
bExtension
)).
isEmpty
()
)
{
Db
table
;
...
...
@@ -1024,8 +1024,7 @@ KeywordInfo* Databases::getKeyword( const rtl::OUString& Database,
Reference
<
XHierarchicalNameAccess
>
Databases
::
jarFile
(
const
rtl
::
OUString
&
jar
,
const
rtl
::
OUString
&
Language
)
{
if
(
!
jar
.
getLength
()
||
!
Language
.
getLength
()
)
if
(
jar
.
isEmpty
()
||
Language
.
isEmpty
()
)
{
return
Reference
<
XHierarchicalNameAccess
>
(
0
);
}
...
...
@@ -1114,8 +1113,7 @@ Reference< XHierarchicalNameAccess > Databases::findJarFileForPath
rtl
::
OUString
*
o_pExtensionRegistryPath
)
{
Reference
<
XHierarchicalNameAccess
>
xNA
;
if
(
!
jar
.
getLength
()
||
!
Language
.
getLength
()
)
if
(
jar
.
isEmpty
()
||
Language
.
isEmpty
()
)
{
return
xNA
;
}
...
...
@@ -1136,7 +1134,7 @@ Reference< XHierarchicalNameAccess > Databases::findJarFileForPath
aIdentifierInPath
=
path
.
copy
(
0
,
nFindSlash
);
beans
::
Optional
<
rtl
::
OUString
>
aIdentifierOptional
=
xParentPackageBundle
->
getIdentifier
();
if
(
aIdentifierInPath
.
getLength
()
&&
aIdentifierOptional
.
IsPresent
)
if
(
!
aIdentifierInPath
.
isEmpty
()
&&
aIdentifierOptional
.
IsPresent
)
{
rtl
::
OUString
aUnencodedIdentifier
=
aIdentifierOptional
.
Value
;
rtl
::
OUString
aIdentifier
=
rtl
::
Uri
::
encode
(
aUnencodedIdentifier
,
...
...
@@ -1616,7 +1614,7 @@ rtl::OUString ExtensionIteratorBase::implGetFileFromPackage(
const
rtl
::
OUString
&
rFileExtension
,
Reference
<
deployment
::
XPackage
>
xPackage
)
{
// No extension -> search for pure language folder
bool
bLangFolderOnly
=
(
rFileExtension
.
getLength
()
==
0
);
bool
bLangFolderOnly
=
rFileExtension
.
isEmpty
(
);
rtl
::
OUString
aFile
;
rtl
::
OUString
aLanguage
=
m_aLanguage
;
...
...
@@ -1769,7 +1767,7 @@ Db* DataBaseIterator::implGetDbFromPackage( Reference< deployment::XPackage > xP
}
Db
*
pRetDb
=
NULL
;
if
(
optRegData
.
IsPresent
&&
optRegData
.
Value
.
getLength
()
>
0
)
if
(
optRegData
.
IsPresent
&&
!
optRegData
.
Value
.
isEmpty
()
)
{
rtl
::
OUString
aRegDataUrl
(
optRegData
.
Value
);
aRegDataUrl
+=
aSlash
;
...
...
@@ -1817,7 +1815,7 @@ rtl::OUString KeyDataBaseFileIterator::nextDbFile( bool& o_rbExtension )
{
rtl
::
OUString
aRetFile
;
while
(
!
aRetFile
.
getLength
()
&&
m_eState
!=
END_REACHED
)
while
(
aRetFile
.
isEmpty
()
&&
m_eState
!=
END_REACHED
)
{
switch
(
m_eState
)
{
...
...
@@ -2021,7 +2019,7 @@ rtl::OUString IndexFolderIterator::nextIndexFolder( bool& o_rbExtension, bool& o
{
rtl
::
OUString
aIndexFolder
;
while
(
!
aIndexFolder
.
getLength
()
&&
m_eState
!=
END_REACHED
)
while
(
aIndexFolder
.
isEmpty
()
&&
m_eState
!=
END_REACHED
)
{
switch
(
m_eState
)
{
...
...
xmlhelp/source/cxxhelp/provider/provider.cxx
Dosyayı görüntüle @
2727a29e
...
...
@@ -274,7 +274,7 @@ void ContentProvider::init()
"org.openoffice.Office.Common"
)
);
rtl
::
OUString
instPath
(
getKey
(
xHierAccess
,
"Path/Current/Help"
)
);
if
(
!
instPath
.
getLength
()
)
if
(
instPath
.
isEmpty
()
)
// try to determine path from default
instPath
=
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"$(instpath)/help"
));
// replace anything like $(instpath);
...
...
xmlhelp/source/cxxhelp/provider/resultsetbase.cxx
Dosyayı görüntüle @
2727a29e
...
...
@@ -410,7 +410,7 @@ ResultSetBase::queryContentIdentifier(
if
(
0
<=
m_nRow
&&
sal
::
static_int_cast
<
sal_uInt32
>
(
m_nRow
)
<
m_aItems
.
size
()
)
{
rtl
::
OUString
url
=
queryContentIdentifierString
();
if
(
!
m_aIdents
[
m_nRow
].
is
()
&&
url
.
getLength
()
)
if
(
!
m_aIdents
[
m_nRow
].
is
()
&&
!
url
.
isEmpty
()
)
m_aIdents
[
m_nRow
]
=
uno
::
Reference
<
ucb
::
XContentIdentifier
>
(
new
::
ucbhelper
::
ContentIdentifier
(
m_xMSF
,
url
)
);
return
m_aIdents
[
m_nRow
];
...
...
xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
Dosyayı görüntüle @
2727a29e
...
...
@@ -103,7 +103,7 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< lang::XMultiServiceF
{
sal_Int32
idx
;
rtl
::
OUString
query
=
m_aURLParameter
.
get_query
();
while
(
query
.
getLength
()
)
while
(
!
query
.
isEmpty
()
)
{
idx
=
query
.
indexOf
(
sal_Unicode
(
' '
)
);
if
(
idx
==
-
1
)
...
...
@@ -143,7 +143,7 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< lang::XMultiServiceF
vector
<
vector
<
HitItem
>*
>
aIndexFolderResultVectorVector
;
bool
bTemporary
;
while
(
(
idxDir
=
aIndexFolderIt
.
nextIndexFolder
(
bExtension
,
bTemporary
)).
getLength
()
>
0
)
while
(
!
(
idxDir
=
aIndexFolderIt
.
nextIndexFolder
(
bExtension
,
bTemporary
)).
isEmpty
()
)
{
vector
<
HitItem
>
aIndexFolderResultVector
;
...
...
xmlhelp/source/cxxhelp/provider/urlparameter.cxx
Dosyayı görüntüle @
2727a29e
...
...
@@ -187,7 +187,7 @@ rtl::OUString URLParameter::get_title()
rtl
::
OUString
URLParameter
::
get_language
()
{
if
(
m_aLanguage
.
getLength
()
==
0
)
if
(
m_aLanguage
.
isEmpty
()
)
return
m_aDefaultLanguage
;
return
m_aLanguage
;
...
...
@@ -196,7 +196,7 @@ rtl::OUString URLParameter::get_language()
rtl
::
OUString
URLParameter
::
get_program
()
{
if
(
!
m_aProgram
.
getLength
()
)
if
(
m_aProgram
.
isEmpty
()
)
{
StaticModuleInformation
*
inf
=
m_pDatabases
->
getStaticInformationForModule
(
get_module
(),
...
...
@@ -341,7 +341,7 @@ void URLParameter::readBerkeley()
m_pDatabases
->
replaceName
(
m_aTitle
);
m_aPath
=
converter
.
getFile
();
m_aJar
=
converter
.
getDatabase
();
if
(
aExtensionPath
.
getLength
()
>
0
)
if
(
!
aExtensionPath
.
isEmpty
()
)
{
rtl
::
OUStringBuffer
aExtendedJarStrBuf
;
aExtendedJarStrBuf
.
append
(
aQuestionMark
);
...
...
@@ -550,8 +550,8 @@ void URLParameter::parse() throw( com::sun::star::ucb::IllegalIdentifierExceptio
if
(
!
scheme
()
||
!
name
(
module
()
)
||
!
query
()
||
!
m_aLanguage
.
getLength
()
||
!
m_aSystem
.
getLength
()
)
m_aLanguage
.
isEmpty
()
||
m_aSystem
.
isEmpty
()
)
throw
com
::
sun
::
star
::
ucb
::
IllegalIdentifierException
();
}
...
...
@@ -635,7 +635,7 @@ bool URLParameter::query()
{
rtl
::
OUString
query_
;
if
(
!
m_aExpr
.
getLength
()
)
if
(
m_aExpr
.
isEmpty
()
)
return
true
;
else
if
(
(
m_aExpr
.
getStr
())[
0
]
==
sal_Unicode
(
'?'
)
)
query_
=
m_aExpr
.
copy
(
1
).
trim
();
...
...
@@ -647,7 +647,7 @@ bool URLParameter::query()
sal_Int32
delimIdx
,
equalIdx
;
rtl
::
OUString
parameter
,
value
;
while
(
query_
.
getLength
()
!=
0
)
while
(
!
query_
.
isEmpty
()
)
{
delimIdx
=
query_
.
indexOf
(
sal_Unicode
(
'&'
)
);
equalIdx
=
query_
.
indexOf
(
sal_Unicode
(
'='
)
);
...
...
@@ -677,7 +677,7 @@ bool URLParameter::query()
m_aDbPar
=
value
;
else
if
(
parameter
.
compareToAscii
(
"Query"
)
==
0
)
{
if
(
!
m_aQuery
.
getLength
()
)
if
(
m_aQuery
.
isEmpty
()
)
m_aQuery
=
value
;
else
m_aQuery
+=
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
" "
))
+
value
);
...
...
@@ -756,7 +756,7 @@ static void *
zipOpen
(
SAL_UNUSED_PARAMETER
const
char
*
)
{
rtl
::
OUString
language
,
jar
,
path
;
if
(
ugblData
->
m_pInitial
->
get_eid
().
getLength
()
)
if
(
!
ugblData
->
m_pInitial
->
get_eid
().
isEmpty
()
)
return
(
void
*
)(
new
Reference
<
XHierarchicalNameAccess
>
);
else
{
...
...
@@ -839,7 +839,7 @@ helpRead(void * context, char * buffer, int len) {
static
int
zipRead
(
void
*
context
,
char
*
buffer
,
int
len
)
{
if
(
ugblData
->
m_pInitial
->
get_eid
().
getLength
()
)
if
(
!
ugblData
->
m_pInitial
->
get_eid
().
isEmpty
()
)
{
ugblData
->
m_pDatabases
->
popupDocument
(
ugblData
->
m_pInitial
,
&
buffer
,
&
len
);
return
len
;
...
...
@@ -946,7 +946,7 @@ InputStreamTransformer::InputStreamTransformer( URLParameter* urlParam,
parString
[
last
++
]
=
"hp"
;
parString
[
last
++
]
=
rtl
::
OString
(
'\''
)
+
urlParam
->
getByName
(
"HelpPrefix"
)
+
rtl
::
OString
(
'\''
);
if
(
parString
[
last
-
1
].
getLength
()
)
if
(
!
parString
[
last
-
1
].
isEmpty
()
)
{
parString
[
last
++
]
=
"sm"
;
parString
[
last
++
]
=
"'vnd.sun.star.help%3A%2F%2F'"
;
...
...
@@ -992,7 +992,7 @@ InputStreamTransformer::InputStreamTransformer( URLParameter* urlParam,
// Path not yet specified, search directly
Reference
<
XHierarchicalNameAccess
>
xNA
=
pDatabases
->
findJarFileForPath
(
aJar
,
urlParam
->
get_language
(),
urlParam
->
get_path
(),
&
aExtensionPath
,
&
aExtensionRegistryPath
);
if
(
xNA
.
is
()
&&
aExtensionPath
.
getLength
()
)
if
(
xNA
.
is
()
&&
!
aExtensionPath
.
isEmpty
()
)
bAddExtensionPath
=
true
;
}
...
...
xmlhelp/source/cxxhelp/provider/urlparameter.hxx
Dosyayı görüntüle @
2727a29e
...
...
@@ -127,12 +127,12 @@ namespace chelp {
throw
(
com
::
sun
::
star
::
ucb
::
IllegalIdentifierException
);
bool
isPicture
()
const
{
return
m_aModule
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"picture"
));
}
bool
isActive
()
const
{
return
m_aActive
.
getLength
()
>
0
&&
m_aActive
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"true"
));
}
bool
isQuery
()
const
{
return
m_aId
.
getLength
()
==
0
&&
m_aQuery
.
getLength
()
!=
0
;
}
bool
isActive
()
const
{
return
!
m_aActive
.
isEmpty
()
&&
m_aActive
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"true"
));
}
bool
isQuery
()
const
{
return
m_aId
.
isEmpty
()
&&
!
m_aQuery
.
isEmpty
()
;
}
bool
isEntryForModule
()
const
{
return
m_aId
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"start"
))
||
m_bStart
;
}
bool
isFile
()
const
{
return
m_aId
.
getLength
()
!=
0
;
}
bool
isModule
()
const
{
return
m_aId
.
getLength
()
==
0
&&
m_aModule
.
getLength
()
!=
0
;
}
bool
isRoot
()
const
{
return
m_aModule
.
getLength
()
==
0
;
}
bool
isFile
()
const
{
return
!
m_aId
.
isEmpty
()
;
}
bool
isModule
()
const
{
return
m_aId
.
isEmpty
()
&&
!
m_aModule
.
isEmpty
()
;
}
bool
isRoot
()
const
{
return
m_aModule
.
isEmpty
()
;
}
bool
isErrorDocument
();
rtl
::
OUString
get_url
()
const
{
return
m_aURL
;
}
...
...
@@ -157,7 +157,7 @@ namespace chelp {
rtl
::
OUString
get_dbpar
()
const
{
if
(
m_aDbPar
.
getLength
()
)
if
(
!
m_aDbPar
.
isEmpty
()
)
return
m_aDbPar
;
else
return
m_aModule
;
...
...
xmlhelp/source/treeview/tvfactory.cxx
Dosyayı görüntüle @
2727a29e
...
...
@@ -188,7 +188,7 @@ TVFactory::createInstanceWithArguments(
break
;
}
if
(
hierview
.
getLength
()
)
if
(
!
hierview
.
isEmpty
()
)
{
Reference
<
XHierarchicalNameAccess
>
xhieraccess
(
m_xHDS
,
UNO_QUERY
);
Any
aAny
=
xhieraccess
->
getByHierarchicalName
(
hierview
);
...
...
xmlhelp/source/treeview/tvread.cxx
Dosyayı görüntüle @
2727a29e
...
...
@@ -135,7 +135,7 @@ namespace treeview {
rtl
::
OUString
getTargetURL
()
{
if
(
!
targetURL
.
getLength
()
)
if
(
targetURL
.
isEmpty
()
)
{
sal_Int32
len
;
for
(
const
TVDom
*
p
=
this
;;
p
=
p
->
parent
)
...
...
@@ -307,7 +307,7 @@ TVRead::TVRead( const ConfigData& configData,TVDom* tvDom )
if
(
tvDom
->
isLeaf
()
)
{
TargetURL
=
(
tvDom
->
getTargetURL
()
+
configData
.
appendix
);
if
(
tvDom
->
anchor
.
getLength
()
)
if
(
!
tvDom
->
anchor
.
isEmpty
()
)
TargetURL
+=
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"#"
))
+
tvDom
->
anchor
);
}
...
...
@@ -504,8 +504,7 @@ TVChildTarget::TVChildTarget( const Reference< XMultiServiceFactory >& xMSF )
{
ConfigData
configData
=
init
(
xMSF
);
if
(
!
configData
.
locale
.
getLength
()
||
!
configData
.
system
.
getLength
()
)
if
(
configData
.
locale
.
isEmpty
()
||
configData
.
system
.
isEmpty
()
)
return
;
sal_uInt64
ret
,
len
=
0
;
...
...
@@ -665,7 +664,7 @@ ConfigData TVChildTarget::init( const Reference< XMultiServiceFactory >& xSMgr )
rtl
::
OUString
system
(
getKey
(
xHierAccess
,
"Help/System"
)
);
sal_Bool
showBasic
(
getBooleanKey
(
xHierAccess
,
"Help/ShowBasic"
)
);
rtl
::
OUString
instPath
(
getKey
(
xHierAccess
,
"Path/Current/Help"
)
);
if
(
!
instPath
.
getLength
()
)
if
(
instPath
.
isEmpty
()
)
// try to determine path from default
instPath
=
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"$(instpath)/help"
));
...
...
@@ -742,7 +741,7 @@ ConfigData TVChildTarget::init( const Reference< XMultiServiceFactory >& xSMgr )
TreeFileIterator
aTreeIt
(
locale
);
rtl
::
OUString
aTreeFile
;
sal_Int32
nFileSize
;
while
(
(
aTreeFile
=
aTreeIt
.
nextTreeFile
(
nFileSize
)
).
getLength
()
>
0
)
while
(
!
(
aTreeFile
=
aTreeIt
.
nextTreeFile
(
nFileSize
)
).
isEmpty
()
)
{
configData
.
vFileLen
.
push_back
(
nFileSize
);
configData
.
vFileURL
.
push_back
(
aTreeFile
);
...
...
@@ -1183,7 +1182,7 @@ rtl::OUString TreeFileIterator::nextTreeFile( sal_Int32& rnFileSize )
{
rtl
::
OUString
aRetFile
;
while
(
!
aRetFile
.
getLength
()
&&
m_eState
!=
END_REACHED
)
while
(
aRetFile
.
isEmpty
()
&&
m_eState
!=
END_REACHED
)
{
switch
(
m_eState
)
{
...
...
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