[Libreoffice-commits] .: 5 commits - sc/Module_sc.mk sc/source
Markus Mohrhard
mmohrhard at kemper.freedesktop.org
Wed Feb 8 17:47:20 PST 2012
sc/Module_sc.mk | 4 ++--
sc/source/core/data/documen2.cxx | 8 ++++++++
sc/source/ui/docshell/impex.cxx | 2 +-
sc/source/ui/view/preview.cxx | 15 ++++++---------
4 files changed, 17 insertions(+), 12 deletions(-)
New commits:
commit 73088aaaed3ad16f80405a3d87cea437d350b893
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Wed Feb 8 23:37:49 2012 +0100
we need to explicitly set the paste area in ScMarkData, fdo#45481
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index ede56eb..dd1ed03 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -263,7 +263,7 @@ void ScImportExport::EndPaste()
pRedoDoc->InitUndo( pDoc, aRange.aStart.Tab(), aRange.aEnd.Tab() );
pDoc->CopyToDocument( aRange, IDF_ALL | IDF_NOCAPTIONS, false, pRedoDoc );
ScMarkData aDestMark;
- aDestMark.SelectOneTable( aRange.aStart.Tab() );
+ aDestMark.SetMarkArea(aRange);
pDocSh->GetUndoManager()->AddUndoAction(
new ScUndoPaste(pDocSh, aRange, aDestMark, pUndoDoc, pRedoDoc, IDF_ALL, NULL));
}
commit b14f61c40c1ddd897ba4b54c063753c2e3550d46
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Wed Feb 8 21:04:05 2012 +0100
remove unnecessary check
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index 51e581c..67e6171 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -269,7 +269,6 @@ void ScPreview::CalcPages()
long nThisStart = nTotalPages;
ScPrintFunc aPrintFunc( this, pDocShell, i, nAttrPage, 0, NULL, &aOptions );
- aPrintFunc.InitParam( &aOptions );
long nThisTab = aPrintFunc.GetTotalPages();
nPages[i] = nThisTab;
nTotalPages += nThisTab;
@@ -291,10 +290,7 @@ void ScPreview::CalcPages()
if (nTabCount > nTabsTested)
nTabsTested = nTabCount;
- // testen, ob hinter letzter Seite
-
- if ( nTabsTested >= nTabCount )
- TestLastPage();
+ TestLastPage();
aState.nDocPages = nTotalPages;
commit d7eddc670410d7194918ff99c735052b880469d8
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Wed Feb 8 21:02:01 2012 +0100
remove unnecessary temporary variable
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index 4d72ef9..51e581c 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -231,7 +231,6 @@ void ScPreview::CalcPages()
ScDocument* pDoc = pDocShell->GetDocument();
nTabCount = pDoc->GetTableCount();
- SCTAB nAnz = nTabCount;
SCTAB nStart = nTabsTested;
if (!bValid)
{
@@ -242,7 +241,7 @@ void ScPreview::CalcPages()
// update all pending row heights with a single progress bar,
// instead of a separate progress for each sheet from ScPrintFunc
- pDocShell->UpdatePendingRowHeights( nAnz-1, true );
+ pDocShell->UpdatePendingRowHeights( nTabCount-1, true );
// PrintOptions is passed to PrintFunc for SkipEmpty flag,
// but always all sheets are used (there is no selected sheet)
@@ -252,7 +251,8 @@ void ScPreview::CalcPages()
nPages.push_back(0);
while (nStart > static_cast<SCTAB>(nFirstAttr.size()))
nFirstAttr.push_back(0);
- for (SCTAB i=nStart; i<nAnz; i++)
+
+ for (SCTAB i=nStart; i<nTabCount; i++)
{
if ( i == static_cast<SCTAB>(nPages.size()))
nPages.push_back(0);
@@ -269,6 +269,7 @@ void ScPreview::CalcPages()
long nThisStart = nTotalPages;
ScPrintFunc aPrintFunc( this, pDocShell, i, nAttrPage, 0, NULL, &aOptions );
+ aPrintFunc.InitParam( &aOptions );
long nThisTab = aPrintFunc.GetTotalPages();
nPages[i] = nThisTab;
nTotalPages += nThisTab;
@@ -287,8 +288,8 @@ void ScPreview::CalcPages()
nDisplayStart = lcl_GetDisplayStart( nTab, pDoc, nPages );
- if (nAnz > nTabsTested)
- nTabsTested = nAnz;
+ if (nTabCount > nTabsTested)
+ nTabsTested = nTabCount;
// testen, ob hinter letzter Seite
commit d893218da7b3e77c97eb7c96384728776f7c870c
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Wed Feb 8 20:06:42 2012 +0100
use slowcheck in sc
diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk
index ef47326..074b1f1 100644
--- a/sc/Module_sc.mk
+++ b/sc/Module_sc.mk
@@ -42,11 +42,12 @@ $(eval $(call gb_Module_add_targets,sc,\
endif
$(eval $(call gb_Module_add_check_targets,sc,\
+ CppunitTest_sc_ucalc \
CppunitTest_sc_filters_test \
))
$(eval $(call gb_Module_add_slowcheck_targets,sc,\
- CppunitTest_sc_ucalc \
+ CppunitTest_sc_subsequent_filters_test \
))
$(eval $(call gb_Module_add_subsequentcheck_targets,sc,\
@@ -59,7 +60,6 @@ $(eval $(call gb_Module_add_subsequentcheck_targets,sc,\
CppunitTest_sc_namedrangeobj \
CppunitTest_sc_namedrangesobj \
CppunitTest_sc_tablesheetsobj \
- CppunitTest_sc_subsequent_filters_test \
))
# vim: set noet sw=4 ts=4:
commit b1c9d167ef96df5c3a781ed825d789505a325324
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Wed Feb 8 17:48:15 2012 +0100
copy settings for RTL with sheets, fdo#45768
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index d79e52d..81031b9 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -910,6 +910,10 @@ bool ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyM
// Copy the custom print range if exists.
maTabs[nNewPos]->CopyPrintRange(*maTabs[nOldPos]);
+
+ // Copy the RTL settings
+ maTabs[nNewPos]->SetLayoutRTL(maTabs[nOldPos]->IsLayoutRTL());
+ maTabs[nNewPos]->SetLoadingRTL(maTabs[nOldPos]->IsLoadingRTL());
}
else
SetAutoCalc( bOldAutoCalc );
@@ -945,6 +949,10 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
pSrcDoc->GetName(nSrcPos, aName);
CreateValidTabName(aName);
bValid = InsertTab(nDestPos, aName);
+
+ // Copy the RTL settings
+ maTabs[nDestPos]->SetLayoutRTL(pSrcDoc->maTabs[nSrcPos]->IsLayoutRTL());
+ maTabs[nDestPos]->SetLoadingRTL(pSrcDoc->maTabs[nDestPos]->IsLoadingRTL());
}
else // bestehende Tabelle ersetzen
{
More information about the Libreoffice-commits
mailing list