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
67c989ad
Kaydet (Commit)
67c989ad
authored
Ara 23, 2014
tarafından
Matúš Kukan
Kaydeden (comit)
Markus Mohrhard
Ock 07, 2015
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#82014: Remove old conditional formats when setting new one by UNO API
Change-Id: I76488045eba281227124041da505e38c4c3d31c1
üst
57fa90ba
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
7 deletions
+25
-7
attarray.hxx
sc/inc/attarray.hxx
+1
-0
attarray.cxx
sc/source/core/data/attarray.cxx
+5
-3
cellsuno.cxx
sc/source/ui/unoobj/cellsuno.cxx
+19
-4
No files found.
sc/inc/attarray.hxx
Dosyayı görüntüle @
67c989ad
...
...
@@ -132,6 +132,7 @@ public:
const
::
editeng
::
SvxBorderLine
*
pLine
,
bool
bColorOnly
);
void
AddCondFormat
(
SCROW
nStartRow
,
SCROW
nEndRow
,
sal_uInt32
nIndex
);
/// if nIndex == 0, remove all conditional format data
void
RemoveCondFormat
(
SCROW
nStartRow
,
SCROW
nEndRow
,
sal_uInt32
nIndex
);
void
ClearItems
(
SCROW
nStartRow
,
SCROW
nEndRow
,
const
sal_uInt16
*
pWhich
);
...
...
sc/source/core/data/attarray.cxx
Dosyayı görüntüle @
67c989ad
...
...
@@ -308,15 +308,17 @@ void ScAttrArray::RemoveCondFormat( SCROW nStartRow, SCROW nEndRow, sal_uInt32 n
{
std
::
vector
<
sal_uInt32
>
aCondFormatData
=
static_cast
<
const
ScCondFormatItem
*>
(
pItem
)
->
GetCondFormatData
();
std
::
vector
<
sal_uInt32
>::
iterator
itr
=
std
::
find
(
aCondFormatData
.
begin
(),
aCondFormatData
.
end
(),
nIndex
);
if
(
itr
!=
aCondFormatData
.
end
())
if
(
itr
!=
aCondFormatData
.
end
()
||
nIndex
==
0
)
{
ScCondFormatItem
aItem
;
aCondFormatData
.
erase
(
itr
);
if
(
nIndex
==
0
)
aCondFormatData
.
clear
();
else
aCondFormatData
.
erase
(
itr
);
aItem
.
SetCondFormatData
(
aCondFormatData
);
aPattern
.
GetItemSet
().
Put
(
aItem
);
SetPatternArea
(
nTempStartRow
,
nTempEndRow
,
&
aPattern
,
true
);
}
}
}
else
...
...
sc/source/ui/unoobj/cellsuno.cxx
Dosyayı görüntüle @
67c989ad
...
...
@@ -2392,11 +2392,26 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
formula::FormulaGrammar::GRAM_UNSPECIFIED :
formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML));
ScConditionalFormat* pNew = new ScConditionalFormat( 0, &rDoc ); // Index wird beim Einfuegen gesetzt
pFormat->FillFormat( *pNew, &rDoc, eGrammar );
pNew->AddRange( aRanges );
SCTAB nTab = aRanges.front()->aStart.Tab();
pDocShell->GetDocFunc().ReplaceConditionalFormat( 0, pNew, nTab, aRanges );
// To remove conditional formats for all cells in aRanges we need to:
// Remove conditional format data from cells' attributes
rDoc.RemoveCondFormatData( aRanges, nTab, 0 );
// And also remove ranges from conditional formats list
for (size_t i = 0; i < aRanges.size(); ++i)
{
rDoc.GetCondFormList( aRanges[i]->aStart.Tab() )->DeleteArea(
aRanges[i]->aStart.Col(), aRanges[i]->aStart.Row(),
aRanges[i]->aEnd.Col(), aRanges[i]->aEnd.Row() );
}
// Then we can apply new conditional format if there is one
if (pFormat->getCount())
{
ScConditionalFormat* pNew = new ScConditionalFormat( 0, &rDoc ); // Index wird beim Einfuegen gesetzt
pFormat->FillFormat( *pNew, &rDoc, eGrammar );
pNew->AddRange( aRanges );
pDocShell->GetDocFunc().ReplaceConditionalFormat( 0, pNew, nTab, aRanges );
}
}
}
}
...
...
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