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
f73571b5
Kaydet (Commit)
f73571b5
authored
Eki 31, 2012
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
extract filling the cache for conditional formats
Change-Id: I90c4f7ac5c462a507cf0d44b7837facdd2bc3643
üst
2829bc14
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
11 deletions
+18
-11
conditio.hxx
sc/inc/conditio.hxx
+5
-3
conditio.cxx
sc/source/core/data/conditio.cxx
+13
-8
No files found.
sc/inc/conditio.hxx
Dosyayı görüntüle @
f73571b5
...
...
@@ -177,8 +177,8 @@ class SC_DLLPUBLIC ScConditionEntry : public ScFormatEntry
bool
bTextToReal
);
void
Interpret
(
const
ScAddress
&
rPos
);
bool
IsValid
(
double
nArg
,
const
ScAddress
&
rAddr
)
const
;
bool
IsValidStr
(
const
String
&
rArg
,
const
ScAddress
&
rAddr
)
const
;
bool
IsValid
(
double
nArg
)
const
;
bool
IsValidStr
(
const
String
&
rArg
)
const
;
public
:
ScConditionEntry
(
ScConditionMode
eOper
,
...
...
@@ -248,7 +248,9 @@ protected:
private
:
bool
IsDuplicate
(
double
nArg
,
const
rtl
::
OUString
&
rStr
,
const
ScAddress
&
rAddr
,
const
ScRangeList
&
rRanges
)
const
;
bool
IsDuplicate
(
double
nArg
,
const
rtl
::
OUString
&
rStr
,
const
ScRangeList
&
rRanges
)
const
;
void
FillCache
(
const
ScRangeList
&
rRanges
)
const
;
struct
ScConditionEntryCache
{
...
...
sc/source/core/data/conditio.cxx
Dosyayı görüntüle @
f73571b5
...
...
@@ -768,7 +768,7 @@ static bool lcl_GetCellContent( ScBaseCell* pCell, bool bIsStr1, double& rArg, r
return
bVal
;
}
bool
ScConditionEntry
::
IsDuplicate
(
double
nArg
,
const
rtl
::
OUString
&
rStr
,
const
ScAddress
&
rAddr
,
const
ScRangeList
&
rRanges
)
const
void
ScConditionEntry
::
FillCache
(
const
ScRangeList
&
rRanges
)
const
{
if
(
!
mpCache
)
{
...
...
@@ -798,7 +798,7 @@ bool ScConditionEntry::IsDuplicate( double nArg, const rtl::OUString& rStr, cons
double
nVal
=
0.0
;
ScBaseCell
*
pCell
=
NULL
;
mpDoc
->
GetCell
(
c
,
r
,
rAddr
.
Tab
()
,
pCell
);
mpDoc
->
GetCell
(
c
,
r
,
nTab
,
pCell
);
if
(
!
pCell
)
continue
;
...
...
@@ -818,6 +818,11 @@ bool ScConditionEntry::IsDuplicate( double nArg, const rtl::OUString& rStr, cons
}
}
}
}
bool
ScConditionEntry
::
IsDuplicate
(
double
nArg
,
const
rtl
::
OUString
&
rStr
,
const
ScRangeList
&
rRanges
)
const
{
FillCache
(
rRanges
);
if
(
rStr
.
isEmpty
())
{
...
...
@@ -847,7 +852,7 @@ bool ScConditionEntry::IsDuplicate( double nArg, const rtl::OUString& rStr, cons
}
}
bool
ScConditionEntry
::
IsValid
(
double
nArg
,
const
ScAddress
&
rAddr
)
const
bool
ScConditionEntry
::
IsValid
(
double
nArg
)
const
{
// Interpret muss schon gerufen sein
...
...
@@ -910,7 +915,7 @@ bool ScConditionEntry::IsValid( double nArg, const ScAddress& rAddr ) const
if
(
pCondFormat
)
{
const
ScRangeList
&
aRanges
=
pCondFormat
->
GetRange
();
bValid
=
IsDuplicate
(
nArg
,
rtl
::
OUString
(),
rAddr
,
aRanges
);
bValid
=
IsDuplicate
(
nArg
,
rtl
::
OUString
(),
aRanges
);
if
(
eOp
==
SC_COND_NOTDUPLICATE
)
bValid
=
!
bValid
;
}
...
...
@@ -925,7 +930,7 @@ bool ScConditionEntry::IsValid( double nArg, const ScAddress& rAddr ) const
return
bValid
;
}
bool
ScConditionEntry
::
IsValidStr
(
const
String
&
rArg
,
const
ScAddress
&
rAddr
)
const
bool
ScConditionEntry
::
IsValidStr
(
const
String
&
rArg
)
const
{
bool
bValid
=
false
;
// Interpret muss schon gerufen sein
...
...
@@ -938,7 +943,7 @@ bool ScConditionEntry::IsValidStr( const String& rArg, const ScAddress& rAddr )
if
(
pCondFormat
&&
rArg
.
Len
()
)
{
const
ScRangeList
&
aRanges
=
pCondFormat
->
GetRange
();
bValid
=
IsDuplicate
(
0.0
,
rArg
,
rAddr
,
aRanges
);
bValid
=
IsDuplicate
(
0.0
,
rArg
,
aRanges
);
if
(
eOp
==
SC_COND_NOTDUPLICATE
)
bValid
=
!
bValid
;
return
bValid
;
...
...
@@ -1020,9 +1025,9 @@ bool ScConditionEntry::IsCellValid( ScBaseCell* pCell, const ScAddress& rPos ) c
rtl
::
OUString
aArgStr
;
bool
bVal
=
lcl_GetCellContent
(
pCell
,
bIsStr1
,
nArg
,
aArgStr
);
if
(
bVal
)
return
IsValid
(
nArg
,
rPos
);
return
IsValid
(
nArg
);
else
return
IsValidStr
(
aArgStr
,
rPos
);
return
IsValidStr
(
aArgStr
);
}
String
ScConditionEntry
::
GetExpression
(
const
ScAddress
&
rCursor
,
sal_uInt16
nIndex
,
...
...
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