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
eb240530
Kaydet (Commit)
eb240530
authored
Kas 12, 2012
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
remove conditional formats withiout range after import, related fdo#56983
Change-Id: I9a8c02369c3e5a12310a46229bdc1671f75593ad
üst
51533c72
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
4 deletions
+35
-4
conditio.hxx
sc/inc/conditio.hxx
+6
-0
conditio.cxx
sc/source/core/data/conditio.cxx
+16
-4
xmlcondformat.cxx
sc/source/filter/xml/xmlcondformat.cxx
+11
-0
xmlcondformat.hxx
sc/source/filter/xml/xmlcondformat.hxx
+2
-0
No files found.
sc/inc/conditio.hxx
Dosyayı görüntüle @
eb240530
...
...
@@ -409,6 +409,12 @@ public:
void
InsertNew
(
ScConditionalFormat
*
pNew
)
{
maConditionalFormats
.
insert
(
pNew
);
}
/**
* Checks that all cond formats have a non empty range.
* Deletes empty cond formats.
* @return true if all cond formats were valid
*/
bool
CheckAllEntries
();
ScConditionalFormat
*
GetFormat
(
sal_uInt32
nKey
);
...
...
sc/source/core/data/conditio.cxx
Dosyayı görüntüle @
eb240530
...
...
@@ -1975,20 +1975,32 @@ void ScConditionalFormatList::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos )
itr
->
UpdateMoveTab
(
nOldPos
,
nNewPos
);
}
void
ScConditionalFormatList
::
DeleteArea
(
SCCOL
nCol1
,
SCROW
nRow1
,
SCCOL
nCol2
,
SCROW
nRow2
)
bool
ScConditionalFormatList
::
CheckAllEntries
(
)
{
for
(
iterator
itr
=
begin
();
itr
!=
end
();
++
itr
)
itr
->
DeleteArea
(
nCol1
,
nRow1
,
nCol2
,
nRow2
);
bool
bValid
=
true
;
//
// need to check which must be deleted
iterator
itr
=
begin
();
while
(
itr
!=
end
())
{
if
(
itr
->
GetRange
().
empty
())
{
bValid
=
false
;
maConditionalFormats
.
erase
(
itr
++
);
}
else
++
itr
;
}
return
bValid
;
}
void
ScConditionalFormatList
::
DeleteArea
(
SCCOL
nCol1
,
SCROW
nRow1
,
SCCOL
nCol2
,
SCROW
nRow2
)
{
for
(
iterator
itr
=
begin
();
itr
!=
end
();
++
itr
)
itr
->
DeleteArea
(
nCol1
,
nRow1
,
nCol2
,
nRow2
);
CheckAllEntries
();
}
void
ScConditionalFormatList
::
SourceChanged
(
const
ScAddress
&
rAddr
)
...
...
sc/source/filter/xml/xmlcondformat.cxx
Dosyayı görüntüle @
eb240530
...
...
@@ -65,6 +65,17 @@ SvXMLImportContext* ScXMLConditionalFormatsContext::CreateChildContext( sal_uInt
return
pContext
;
}
void
ScXMLConditionalFormatsContext
::
EndElement
()
{
ScDocument
*
pDoc
=
GetScImport
().
GetDocument
();
SCTAB
nTab
=
GetScImport
().
GetTables
().
GetCurrentSheet
();
ScConditionalFormatList
*
pCondFormatList
=
pDoc
->
GetCondFormList
(
nTab
);
bool
bDeleted
=
!
pCondFormatList
->
CheckAllEntries
();
SAL_WARN_IF
(
bDeleted
,
"sc"
,
"conditional formats have been deleted because they contained empty range info"
);
}
ScXMLConditionalFormatContext
::
ScXMLConditionalFormatContext
(
ScXMLImport
&
rImport
,
sal_uInt16
nPrfx
,
const
::
rtl
::
OUString
&
rLName
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
xml
::
sax
::
XAttributeList
>&
xAttrList
)
:
SvXMLImportContext
(
rImport
,
nPrfx
,
rLName
)
...
...
sc/source/filter/xml/xmlcondformat.hxx
Dosyayı görüntüle @
eb240530
...
...
@@ -51,6 +51,8 @@ public:
const
::
rtl
::
OUString
&
rLocalName
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
xml
::
sax
::
XAttributeList
>&
xAttrList
);
virtual
void
EndElement
();
};
class
ScXMLConditionalFormatContext
:
public
SvXMLImportContext
...
...
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