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
f75b30c2
Kaydet (Commit)
f75b30c2
authored
Şub 25, 2016
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use SearchOptions2
Change-Id: I4d3820d097d520fdf7cce8b41d734dd4e2e8866f
üst
25d4142c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
GeometryHandler.cxx
reportdesign/source/ui/inspection/GeometryHandler.cxx
+9
-8
No files found.
reportdesign/source/ui/inspection/GeometryHandler.cxx
Dosyayı görüntüle @
f75b30c2
...
@@ -57,7 +57,8 @@
...
@@ -57,7 +57,8 @@
#include <com/sun/star/sdb/FilterDialog.hpp>
#include <com/sun/star/sdb/FilterDialog.hpp>
#include <com/sun/star/sdb/SQLContext.hpp>
#include <com/sun/star/sdb/SQLContext.hpp>
#include <com/sun/star/sdbc/XConnection.hpp>
#include <com/sun/star/sdbc/XConnection.hpp>
#include <com/sun/star/util/SearchOptions.hpp>
#include <com/sun/star/util/SearchOptions2.hpp>
#include <com/sun/star/util/SearchAlgorithms2.hpp>
#include <com/sun/star/util/MeasureUnit.hpp>
#include <com/sun/star/util/MeasureUnit.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
...
@@ -1851,21 +1852,21 @@ bool GeometryHandler::impl_isDefaultFunction_nothrow( const uno::Reference< repo
...
@@ -1851,21 +1852,21 @@ bool GeometryHandler::impl_isDefaultFunction_nothrow( const uno::Reference< repo
try
try
{
{
const
OUString
sFormula
(
_xFunction
->
getFormula
()
);
const
OUString
sFormula
(
_xFunction
->
getFormula
()
);
util
::
SearchOptions
aSearchOptions
;
util
::
SearchOptions
2
aSearchOptions
;
aSearchOptions
.
algorithmType
=
util
::
SearchAlgorithms_
REGEXP
;
aSearchOptions
.
AlgorithmType2
=
util
::
SearchAlgorithms2
::
REGEXP
;
aSearchOptions
.
searchFlag
=
0x00000100
;
aSearchOptions
.
searchFlag
=
0x00000100
;
::
std
::
vector
<
DefaultFunction
>::
const_iterator
aIter
=
m_aDefaultFunctions
.
begin
();
::
std
::
vector
<
DefaultFunction
>::
const_iterator
aIter
=
m_aDefaultFunctions
.
begin
();
::
std
::
vector
<
DefaultFunction
>::
const_iterator
aDeEnd
=
m_aDefaultFunctions
.
end
();
::
std
::
vector
<
DefaultFunction
>::
const_iterator
aDeEnd
=
m_aDefaultFunctions
.
end
();
for
(;
aIter
!=
aDeEnd
;
++
aIter
)
for
(;
aIter
!=
aDeEnd
;
++
aIter
)
{
{
aSearchOptions
.
searchString
=
aIter
->
m_sSearchString
;
aSearchOptions
.
searchString
=
aIter
->
m_sSearchString
;
utl
::
TextSearch
aTextSearch
(
utl
::
TextSearch
::
UpgradeToSearchOptions2
(
aSearchOptions
)
);
utl
::
TextSearch
aTextSearch
(
aSearchOptions
);
sal_Int32
start
=
0
;
sal_Int32
start
=
0
;
sal_Int32
end
=
sFormula
.
getLength
();
sal_Int32
end
=
sFormula
.
getLength
();
if
(
aTextSearch
.
SearchForward
(
sFormula
,
&
start
,
&
end
)
&&
start
==
0
&&
end
==
sFormula
.
getLength
())
// default function found
if
(
aTextSearch
.
SearchForward
(
sFormula
,
&
start
,
&
end
)
&&
start
==
0
&&
end
==
sFormula
.
getLength
())
// default function found
{
{
aSearchOptions
.
searchString
=
"
\\
[[:alpha:]+([:space:]*[:alnum:]*)*
\\
]"
;
aSearchOptions
.
searchString
=
"
\\
[[:alpha:]+([:space:]*[:alnum:]*)*
\\
]"
;
utl
::
TextSearch
aDataSearch
(
utl
::
TextSearch
::
UpgradeToSearchOptions2
(
aSearchOptions
)
);
utl
::
TextSearch
aDataSearch
(
aSearchOptions
);
aDataSearch
.
SearchForward
(
sFormula
,
&
start
,
&
end
);
aDataSearch
.
SearchForward
(
sFormula
,
&
start
,
&
end
);
++
start
;
++
start
;
_rDataField
=
sFormula
.
copy
(
start
,
end
-
start
-
1
);
_rDataField
=
sFormula
.
copy
(
start
,
end
-
start
-
1
);
...
@@ -2072,11 +2073,11 @@ bool GeometryHandler::impl_isCounterFunction_throw(const OUString& _sQuotedFunct
...
@@ -2072,11 +2073,11 @@ bool GeometryHandler::impl_isCounterFunction_throw(const OUString& _sQuotedFunct
if
(
aInitalFormula
.
IsPresent
)
if
(
aInitalFormula
.
IsPresent
)
{
{
const
OUString
sFormula
(
aFind
.
first
->
second
.
first
->
getFormula
()
);
const
OUString
sFormula
(
aFind
.
first
->
second
.
first
->
getFormula
()
);
util
::
SearchOptions
aSearchOptions
;
util
::
SearchOptions
2
aSearchOptions
;
aSearchOptions
.
algorithmType
=
util
::
SearchAlgorithms_
REGEXP
;
aSearchOptions
.
AlgorithmType2
=
util
::
SearchAlgorithms2
::
REGEXP
;
aSearchOptions
.
searchFlag
=
0x00000100
;
aSearchOptions
.
searchFlag
=
0x00000100
;
aSearchOptions
.
searchString
=
m_aCounterFunction
.
m_sSearchString
;
aSearchOptions
.
searchString
=
m_aCounterFunction
.
m_sSearchString
;
utl
::
TextSearch
aTextSearch
(
utl
::
TextSearch
::
UpgradeToSearchOptions2
(
aSearchOptions
)
);
utl
::
TextSearch
aTextSearch
(
aSearchOptions
);
sal_Int32
start
=
0
;
sal_Int32
start
=
0
;
sal_Int32
end
=
sFormula
.
getLength
();
sal_Int32
end
=
sFormula
.
getLength
();
if
(
aTextSearch
.
SearchForward
(
sFormula
,
&
start
,
&
end
)
&&
start
==
0
&&
end
==
sFormula
.
getLength
())
// counter function found
if
(
aTextSearch
.
SearchForward
(
sFormula
,
&
start
,
&
end
)
&&
start
==
0
&&
end
==
sFormula
.
getLength
())
// counter function found
...
...
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