[Libreoffice-commits] .: 2 commits - sc/inc sc/source
Markus Mohrhard
mmohrhard at kemper.freedesktop.org
Mon May 14 06:22:41 PDT 2012
sc/inc/cell.hxx | 2 ++
sc/source/core/data/cell.cxx | 2 +-
sc/source/core/data/colorscale.cxx | 2 +-
sc/source/filter/oox/condformatbuffer.cxx | 4 +---
4 files changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 28062c62818ce40c17fb67b480612f8bb9bcd522
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Mon May 14 09:35:23 2012 +0200
formulas in color scales should not be changed to external references
Change-Id: Ie85bd4320324ef932102576ca4ccf32c3527796c
diff --git a/sc/inc/cell.hxx b/sc/inc/cell.hxx
index 5de0130..3bf2dfe 100644
--- a/sc/inc/cell.hxx
+++ b/sc/inc/cell.hxx
@@ -79,6 +79,8 @@ const int SC_CLONECELL_ADJUST3DREL = 0x0002;
copying cells to undo document, where captions are handled in drawing undo). */
const int SC_CLONECELL_NOCAPTION = 0x0004;
+/** If set, absolute refs will not transformed to external references */
+const int SC_CLONECELL_NOMAKEABS_EXTERNAL = 0x0008;
// ============================================================================
class SC_DLLPUBLIC ScBaseCell
diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx
index 3af1a1b..5fbcbb9 100644
--- a/sc/source/core/data/cell.cxx
+++ b/sc/source/core/data/cell.cxx
@@ -812,7 +812,7 @@ ScFormulaCell::ScFormulaCell( const ScFormulaCell& rCell, ScDocument& rDoc, cons
}
bool bCopyBetweenDocs = pDocument->GetPool() != rCell.pDocument->GetPool();
- if (bCopyBetweenDocs)
+ if (bCopyBetweenDocs && !(nCloneFlags & SC_CLONECELL_NOMAKEABS_EXTERNAL))
{
pCode->ReadjustAbsolute3DReferences( rCell.pDocument, &rDoc, rCell.aPos);
}
diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx
index 35cdb20..bad6a14 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -60,7 +60,7 @@ ScColorScaleEntry::ScColorScaleEntry(ScDocument* pDoc, const ScColorScaleEntry&
{
if(rEntry.mpCell)
{
- mpCell.reset(static_cast<ScFormulaCell*>(rEntry.mpCell->Clone(*pDoc)));
+ mpCell.reset(static_cast<ScFormulaCell*>(rEntry.mpCell->Clone(*pDoc, SC_CLONECELL_NOMAKEABS_EXTERNAL)));
}
}
commit a233a98a90b81ea12e050a77aa4ccbfe5457ab7e
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Mon May 14 09:14:35 2012 +0200
no need to use ScDocFunc here, ScDocument is the better choice
Change-Id: I280e5ab08949415a8179f803177d280540ba0650
diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx
index 0c9cc37..719f3a5 100644
--- a/sc/source/filter/oox/condformatbuffer.cxx
+++ b/sc/source/filter/oox/condformatbuffer.cxx
@@ -56,7 +56,6 @@
#include "colorscale.hxx"
#include "document.hxx"
#include "convuno.hxx"
-#include "docsh.hxx"
#include "docfunc.hxx"
#include "markdata.hxx"
#include "docpool.hxx"
@@ -725,10 +724,9 @@ void CondFormatRule::finalizeImport( const Reference< XSheetConditionalEntries >
ScUnoConversion::FillScRange(aRange, *itr);
ScPatternAttr aPattern( rDoc.GetPool() );
aPattern.GetItemSet().Put( SfxUInt32Item( ATTR_COLORSCALE, nIndex ) );
- ScDocShell* pShell = static_cast<ScDocShell*>(rDoc.GetDocumentShell());
ScMarkData aMarkData;
aMarkData.SetMarkArea(aRange);
- pShell->GetDocFunc().ApplyAttributes( aMarkData, aPattern, sal_True, sal_True );
+ rDoc.ApplySelectionPattern( aPattern , aMarkData);
aList.Append(aRange);
}
More information about the Libreoffice-commits
mailing list