[Libreoffice-commits] .: Branch 'feature/tubes' - sc/source
Eike Rathke
erack at kemper.freedesktop.org
Tue Jul 17 03:48:20 PDT 2012
sc/source/ui/view/viewfunc.cxx | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
New commits:
commit 37a7b70773d5d78d03f037aacc3a4fa01c892fd0
Author: Eike Rathke <erack at redhat.com>
Date: Tue Jul 17 12:47:29 2012 +0200
tubes: rearranged some lines for readability of code
Change-Id: Ifd5b086e687842721247ba893d22a2514710625d
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 64f4a58..c38774a 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -212,18 +212,16 @@ void ScViewFunc::DoAutoAttributes( SCCOL nCol, SCROW nRow, SCTAB nTab,
aFormatSource.Col(), aFormatSource.Row(), nTab );
if ( !((const ScMergeAttr&)pSource->GetItem(ATTR_MERGE)).IsMerged() )
{
- const ScPatternAttr* pDocOld = pDoc->GetPattern( nCol, nRow, nTab );
- // pDocOld is only valid till call ApplyPattern!
-
- const ScStyleSheet* pSrcStyle = pSource->GetStyleSheet();
-
- // Ho hum ... - totally untested but looks fun ! :-)
ScRange aRange( nCol, nRow, nTab, nCol, nRow, nTab );
ScMarkData aMark;
aMark.SetMarkArea( aRange );
ScDocFunc &rFunc = GetViewData()->GetDocFunc();
- if ( pSrcStyle && pSrcStyle != pDocOld->GetStyleSheet() )
+
+ // pOldPattern is only valid until call to ApplyAttributes!
+ const ScPatternAttr* pOldPattern = pDoc->GetPattern( nCol, nRow, nTab );
+ const ScStyleSheet* pSrcStyle = pSource->GetStyleSheet();
+ if ( pSrcStyle && pSrcStyle != pOldPattern->GetStyleSheet() )
rFunc.ApplyStyle( aMark, pSrcStyle->GetName(), sal_True, sal_False );
rFunc.ApplyAttributes( aMark, *pSource, sal_True, sal_False );
More information about the Libreoffice-commits
mailing list