Kaydet (Commit) c76a1ece authored tarafından Markus Mohrhard's avatar Markus Mohrhard

orcus: don't leak old state into new style objects

Change-Id: I744ff8be96bda2fff61c8fc23a067fdd9b2d4930
üst 897b5123
...@@ -974,6 +974,7 @@ size_t ScOrcusStyles::commit_font() ...@@ -974,6 +974,7 @@ size_t ScOrcusStyles::commit_font()
{ {
SAL_INFO("sc.orcus.style", "commit font"); SAL_INFO("sc.orcus.style", "commit font");
maFonts.push_back(maCurrentFont); maFonts.push_back(maCurrentFont);
maCurrentFont = ScOrcusStyles::font();
return maFonts.size() - 1; return maFonts.size() - 1;
} }
...@@ -1003,6 +1004,7 @@ size_t ScOrcusStyles::commit_fill() ...@@ -1003,6 +1004,7 @@ size_t ScOrcusStyles::commit_fill()
{ {
SAL_INFO("sc.orcus.style", "commit fill"); SAL_INFO("sc.orcus.style", "commit fill");
maFills.push_back(maCurrentFill); maFills.push_back(maCurrentFill);
maCurrentFill = ScOrcusStyles::fill();
return maFills.size() - 1; return maFills.size() - 1;
} }
...@@ -1051,6 +1053,7 @@ size_t ScOrcusStyles::commit_cell_protection() ...@@ -1051,6 +1053,7 @@ size_t ScOrcusStyles::commit_cell_protection()
{ {
SAL_INFO("sc.orcus.style", "commit cell protection"); SAL_INFO("sc.orcus.style", "commit cell protection");
maProtections.push_back(maCurrentProtection); maProtections.push_back(maCurrentProtection);
maCurrentProtection = ScOrcusStyles::protection();
return maProtections.size() - 1; return maProtections.size() - 1;
} }
...@@ -1072,6 +1075,7 @@ size_t ScOrcusStyles::commit_number_format() ...@@ -1072,6 +1075,7 @@ size_t ScOrcusStyles::commit_number_format()
{ {
SAL_INFO("sc.orcus.style", "commit number format"); SAL_INFO("sc.orcus.style", "commit number format");
maNumberFormats.push_back(maCurrentNumberFormat); maNumberFormats.push_back(maCurrentNumberFormat);
maCurrentNumberFormat = ScOrcusStyles::number_format();
return maNumberFormats.size() - 1; return maNumberFormats.size() - 1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment