ooo-build r15430 - trunk/patches/test
- From: kyoshida svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r15430 - trunk/patches/test
- Date: Sat, 28 Feb 2009 07:06:27 +0000 (UTC)
Author: kyoshida
Date: Sat Feb 28 07:06:27 2009
New Revision: 15430
URL: http://svn.gnome.org/viewvc/ooo-build?rev=15430&view=rev
Log:
cleaned up a bit.
Modified:
trunk/patches/test/calc-multi-range-copy-paste.diff
Modified: trunk/patches/test/calc-multi-range-copy-paste.diff
==============================================================================
--- trunk/patches/test/calc-multi-range-copy-paste.diff (original)
+++ trunk/patches/test/calc-multi-range-copy-paste.diff Sat Feb 28 07:06:27 2009
@@ -397,18 +397,6 @@
+ }
+ maRanges = aNewRanges;
+}
-diff --git sc/source/core/data/column.cxx sc/source/core/data/column.cxx
-index c396a27..93b33a1 100644
---- sc/source/core/data/column.cxx
-+++ sc/source/core/data/column.cxx
-@@ -1260,6 +1260,7 @@ void ScColumn::InsertRow( SCROW nStartRow, SCSIZE nSize )
-
- void ScColumn::CopyToClip(SCROW nRow1, SCROW nRow2, ScColumn& rColumn, BOOL bKeepScenarioFlags, BOOL bCloneNoteCaptions)
- {
-+ fprintf(stdout, "ScColumn::CopyToClip: col = %ld\n", nCol);
- pAttrArray->CopyArea( nRow1, nRow2, 0, *rColumn.pAttrArray,
- bKeepScenarioFlags ? (SC_MF_ALL & ~SC_MF_SCENARIO) : SC_MF_ALL );
-
diff --git sc/source/core/data/documen2.cxx sc/source/core/data/documen2.cxx
index 9bf31a2..7dfa529 100644
--- sc/source/core/data/documen2.cxx
@@ -471,10 +459,10 @@
SCTAB nClipTab = 0;
diff --git sc/source/core/data/document.cxx sc/source/core/data/document.cxx
-index 6a97fb5..1364b09 100644
+index 6a97fb5..2d73cb2 100644
--- sc/source/core/data/document.cxx
+++ sc/source/core/data/document.cxx
-@@ -94,6 +94,7 @@
+@@ -94,9 +94,36 @@
#include "postit.hxx"
#include "externalrefmgr.hxx"
#include "tabprotection.hxx"
@@ -482,7 +470,36 @@
namespace WritingMode2 = ::com::sun::star::text::WritingMode2;
-@@ -1258,7 +1259,7 @@ void ScDocument::AddUndoTab( SCTAB nTab1, SCTAB nTab2, BOOL bColInfo, BOOL bRowI
++
++#include <stdio.h>
++#include <string>
++
++namespace {
++
++class StackPrinter
++{
++public:
++ explicit StackPrinter(const char* msg) :
++ msMsg(msg)
++ {
++ fprintf(stdout, "%s: --begin\n", msMsg.c_str());
++ }
++
++ ~StackPrinter()
++ {
++ fprintf(stdout, "%s: --end\n", msMsg.c_str());
++ }
++
++private:
++ ::std::string msMsg;
++};
++
++}
++
+ struct ScDefaultAttr
+ {
+ const ScPatternAttr* pAttr;
+@@ -1258,7 +1285,7 @@ void ScDocument::AddUndoTab( SCTAB nTab1, SCTAB nTab2, BOOL bColInfo, BOOL bRowI
void ScDocument::SetCutMode( BOOL bVal )
{
if (bIsClip)
@@ -491,7 +508,7 @@
else
{
DBG_ERROR("SetCutMode without bIsClip");
-@@ -1269,7 +1270,7 @@ void ScDocument::SetCutMode( BOOL bVal )
+@@ -1269,7 +1296,7 @@ void ScDocument::SetCutMode( BOOL bVal )
BOOL ScDocument::IsCutMode()
{
if (bIsClip)
@@ -500,7 +517,7 @@
else
{
DBG_ERROR("IsCutMode ohne bIsClip");
-@@ -1400,9 +1401,11 @@ void ScDocument::CopyToClip(SCCOL nCol1, SCROW nRow1,
+@@ -1400,9 +1427,11 @@ void ScDocument::CopyToClip(SCCOL nCol1, SCROW nRow1,
pClipDoc = SC_MOD()->GetClipDoc();
}
@@ -514,7 +531,7 @@
USHORT i;
SCTAB j;
-@@ -1441,10 +1444,64 @@ void ScDocument::CopyToClip(SCCOL nCol1, SCROW nRow1,
+@@ -1441,10 +1470,64 @@ void ScDocument::CopyToClip(SCCOL nCol1, SCROW nRow1,
}
}
@@ -580,7 +597,7 @@
void ScDocument::CopyTabToClip(SCCOL nCol1, SCROW nRow1,
SCCOL nCol2, SCROW nRow2,
-@@ -1460,14 +1517,16 @@ void ScDocument::CopyTabToClip(SCCOL nCol1, SCROW nRow1,
+@@ -1460,14 +1543,16 @@ void ScDocument::CopyTabToClip(SCCOL nCol1, SCROW nRow1,
pClipDoc = SC_MOD()->GetClipDoc();
}
@@ -599,7 +616,7 @@
}
}
-@@ -1497,6 +1556,7 @@ void ScDocument::TransposeClip( ScDocument* pTransClip, USHORT nFlags, BOOL bAsL
+@@ -1497,6 +1582,7 @@ void ScDocument::TransposeClip( ScDocument* pTransClip, USHORT nFlags, BOOL bAsL
// Daten
@@ -607,7 +624,7 @@
if ( ValidRow(aClipRange.aEnd.Row()-aClipRange.aStart.Row()) )
{
for (SCTAB i=0; i<=MAXTAB; i++)
-@@ -1525,10 +1585,8 @@ void ScDocument::TransposeClip( ScDocument* pTransClip, USHORT nFlags, BOOL bAsL
+@@ -1525,10 +1611,8 @@ void ScDocument::TransposeClip( ScDocument* pTransClip, USHORT nFlags, BOOL bAsL
}
}
@@ -620,22 +637,22 @@
}
else
{
-@@ -1537,9 +1595,21 @@ void ScDocument::TransposeClip( ScDocument* pTransClip, USHORT nFlags, BOOL bAsL
+@@ -1537,9 +1621,21 @@ void ScDocument::TransposeClip( ScDocument* pTransClip, USHORT nFlags, BOOL bAsL
// Dies passiert erst beim Einfuegen...
- bCutMode = FALSE;
+ GetClipParam().mbCutMode = false;
- }
-
++}
++
+ScClipParam& ScDocument::GetClipParam()
+{
+ if (!mpClipParam.get())
+ mpClipParam.reset(new ScClipParam);
+
+ return *mpClipParam;
-+}
-+
+ }
+
+void ScDocument::SetClipParam(const ScClipParam& rParam)
+{
+ mpClipParam.reset(new ScClipParam(rParam));
@@ -643,7 +660,7 @@
BOOL ScDocument::IsClipboardSource() const
{
-@@ -1639,7 +1709,7 @@ void ScDocument::CopyBlockFromClip( SCCOL nCol1, SCROW nRow1,
+@@ -1639,7 +1735,7 @@ void ScDocument::CopyBlockFromClip( SCCOL nCol1, SCROW nRow1,
&& ppClipTab[nClipTab + nFollow + 1] )
++nFollow;
@@ -652,7 +669,7 @@
{
BOOL bOldInserting = IsInsertingFromOtherDoc();
SetInsertingFromOtherDoc( TRUE);
-@@ -1681,7 +1751,9 @@ void ScDocument::CopyNonFilteredFromClip( SCCOL nCol1, SCROW nRow1,
+@@ -1681,7 +1777,9 @@ void ScDocument::CopyNonFilteredFromClip( SCCOL nCol1, SCROW nRow1,
pCBFCP->pClipDoc->GetRowFlagsArray( nFlagTab);
SCROW nSourceRow = rClipStartRow;
@@ -663,13 +680,11 @@
SCROW nDestRow = nRow1;
while ( nSourceRow <= nSourceEnd && nDestRow <= nRow2 )
-@@ -1795,17 +1867,22 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMar
+@@ -1795,17 +1893,20 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMar
SCCOL nXw = 0;
SCROW nYw = 0;
+ ScRange aClipRange;
-+ fprintf(stdout, "ScDocument::CopyFromClip: clip range count = %d\n",
-+ pClipDoc->GetClipParam().maRanges.Count());
+ if (pClipDoc->GetClipParam().maRanges.Count())
+ aClipRange = *pClipDoc->GetClipParam().maRanges.First();
for (SCTAB nTab = 0; nTab <= MAXTAB; nTab++) // find largest merge overlap
@@ -692,7 +707,7 @@
if ( nThisEndX > nXw )
nXw = nThisEndX;
if ( nThisEndY > nYw )
-@@ -1864,10 +1941,10 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMar
+@@ -1864,10 +1965,10 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMar
if (bDoDouble)
ScColumn::bDoubleAlloc = TRUE;
@@ -706,7 +721,7 @@
for (ULONG nRange = 0; nRange < pDestRanges->Count(); ++nRange)
{
const ScRange* pRange = pDestRanges->GetObject( nRange);
-@@ -1918,7 +1995,7 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMar
+@@ -1918,7 +2019,7 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMar
nC2 = Min((SCCOL)(nC1 + nXw), nCol2);
} while (nC1 <= nCol2);
if (nClipStartRow > nClipEndRow)
@@ -715,7 +730,7 @@
nC1 = nCol1;
nC2 = nC1 + nXw;
if (nC2 > nCol2)
-@@ -1991,19 +2068,80 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMar
+@@ -1991,19 +2092,78 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMar
// nachdem alle Listener aufgebaut wurden, kann gebroadcastet werden
BroadcastFromClip( nAllCol1, nAllRow1, nAllCol2, nAllRow2, rMark, nInsFlag );
if (bResetCut)
@@ -730,8 +745,6 @@
+ const ScAddress& rDestPos, const ScMarkData& rMark, sal_uInt16 nInsFlag, ScDocument* pClipDoc,
+ bool bResetCut, bool bAsLink, bool bIncludeFiltered, bool bSkipAttrForEmpty)
+{
-+ fprintf(stdout, "ScDocument::CopyMultiRangeFromClip: skip empty (%d)\n", bSkipAttrForEmpty);
-+
+ if (bIsClip)
+ return;
+
@@ -799,7 +812,7 @@
}
else
{
-@@ -2014,34 +2152,54 @@ void ScDocument::SetClipArea( const ScRange& rArea, BOOL bCut )
+@@ -2014,34 +2174,54 @@ void ScDocument::SetClipArea( const ScRange& rArea, BOOL bCut )
void ScDocument::GetClipArea(SCCOL& nClipX, SCROW& nClipY, BOOL bIncludeFiltered)
{
@@ -881,7 +894,7 @@
}
-@@ -2049,8 +2207,12 @@ void ScDocument::GetClipStart(SCCOL& nClipX, SCROW& nClipY)
+@@ -2049,8 +2229,12 @@ void ScDocument::GetClipStart(SCCOL& nClipX, SCROW& nClipY)
{
if (bIsClip)
{
@@ -896,7 +909,7 @@
}
else
{
-@@ -2066,8 +2228,12 @@ BOOL ScDocument::HasClipFilteredRows()
+@@ -2066,8 +2250,12 @@ BOOL ScDocument::HasClipFilteredRows()
while ( nCountTab < MAXTAB && !pTab[nCountTab] )
++nCountTab;
@@ -959,6 +972,71 @@
USHORT GetOptimalColWidth( SCCOL nCol, SCTAB nTab, BOOL bFormula );
void StartFormatArea();
+diff --git sc/source/ui/view/cellsh.cxx sc/source/ui/view/cellsh.cxx
+index 53e283c..a1a07ea 100644
+--- sc/source/ui/view/cellsh.cxx
++++ sc/source/ui/view/cellsh.cxx
+@@ -205,8 +205,8 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
+ bDisable = (!bSimpleArea) || GetViewData()->SimpleRowMarked();
+ break;
+
+- case SID_COPY: // Kopieren
+- bDisable = (!bSimpleArea && eMarkType != SC_MARK_SIMPLE_FILTERED);
++ case SID_COPY: // Kopieren
++// bDisable = (!bSimpleArea && eMarkType != SC_MARK_SIMPLE_FILTERED);
+ // nur wegen Matrix nicht editierbar? Matrix nicht zerreissen
+ //! schlaegt nicht zu, wenn geschuetzt UND Matrix, aber damit
+ //! muss man leben.. wird in Copy-Routine abgefangen, sonst
+diff --git sc/source/ui/view/cellsh1.cxx sc/source/ui/view/cellsh1.cxx
+index 0868d72..e14bd59 100644
+--- sc/source/ui/view/cellsh1.cxx
++++ sc/source/ui/view/cellsh1.cxx
+@@ -125,6 +125,32 @@ using namespace ::com::sun::star;
+ using namespace ::com::sun::star::beans;
+ using namespace ::com::sun::star::uno;
+
++
++#include <stdio.h>
++#include <string>
++
++namespace {
++
++class StackPrinter
++{
++public:
++ explicit StackPrinter(const char* msg) :
++ msMsg(msg)
++ {
++ fprintf(stdout, "%s: --begin\n", msMsg.c_str());
++ }
++
++ ~StackPrinter()
++ {
++ fprintf(stdout, "%s: --end\n", msMsg.c_str());
++ }
++
++private:
++ ::std::string msMsg;
++};
++
++}
++
+ //------------------------------------------------------------------
+ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
+ {
+diff --git sc/source/ui/view/editsh.cxx sc/source/ui/view/editsh.cxx
+index ac3983e..5f4ee6a 100644
+--- sc/source/ui/view/editsh.cxx
++++ sc/source/ui/view/editsh.cxx
+@@ -215,7 +215,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
+ }
+ break;
+
+- case SID_COPY:
++ case SID_COPY:
+ pTableView->Copy();
+ break;
+
diff --git sc/source/ui/view/tabvwsh4.cxx sc/source/ui/view/tabvwsh4.cxx
index 551ce8a..3d49c52 100644
--- sc/source/ui/view/tabvwsh4.cxx
@@ -973,10 +1051,10 @@
ScRange aDummy;
ScMarkType eMarkType = GetViewData()->GetSimpleArea( aDummy );
diff --git sc/source/ui/view/viewfun3.cxx sc/source/ui/view/viewfun3.cxx
-index a675074..7d66f71 100644
+index a675074..f548c0c 100644
--- sc/source/ui/view/viewfun3.cxx
+++ sc/source/ui/view/viewfun3.cxx
-@@ -210,6 +210,7 @@
+@@ -210,9 +210,38 @@
#include "drwtrans.hxx"
#include "docuno.hxx"
#include "undodat.hxx" // Amelia Wang
@@ -984,7 +1062,38 @@
using namespace com::sun::star;
-@@ -310,10 +311,10 @@ BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, BOOL bCut, BOOL bApi, BOOL bI
++
++#include <stdio.h>
++#include <string>
++
++namespace {
++
++class StackPrinter
++{
++public:
++ explicit StackPrinter(const char* msg) :
++ msMsg(msg)
++ {
++ fprintf(stdout, "%s: --begin\n", msMsg.c_str());
++ fflush(stdout);
++ }
++
++ ~StackPrinter()
++ {
++ fprintf(stdout, "%s: --end\n", msMsg.c_str());
++ fflush(stdout);
++ }
++
++private:
++ ::std::string msMsg;
++};
++
++}
++
+ // STATIC DATA ---------------------------------------------------------------
+
+
+@@ -310,10 +339,10 @@ BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, BOOL bCut, BOOL bApi, BOOL bI
ScRange aRange;
ScMarkType eMarkType = GetViewData()->GetSimpleArea( aRange );
@@ -997,21 +1106,16 @@
if ( !pDoc->HasSelectedBlockMatrixFragment(
aRange.aStart.Col(), aRange.aStart.Row(),
aRange.aEnd.Col(), aRange.aEnd.Row(),
-@@ -380,10 +381,131 @@ BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, BOOL bCut, BOOL bApi, BOOL bI
+@@ -380,10 +409,126 @@ BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, BOOL bCut, BOOL bApi, BOOL bI
ErrorMessage(STR_MATRIXFRAGMENTERR);
}
}
+ else if (eMarkType == SC_MARK_MULTI)
+ {
+ bool bSuccess = false;
-+ fprintf(stdout, "ScViewFunc::CopyToClip: multi selection.\n");
+ ScClipParam aClipParam;
+ aClipParam.mbCutMode = false;
+ rMark.FillRangeListWithMarks(&aClipParam.maRanges, false);
-+ String aStr;
-+ aClipParam.maRanges.Format(aStr, SCR_ABS_3D, pDoc);
-+ fprintf(stdout, "ScViewFunc::CopyToClip: ranges = '%s'\n",
-+ rtl::OUStringToOString(aStr, RTL_TEXTENCODING_UTF8).getStr());
+
+ do
+ {
@@ -1131,7 +1235,7 @@
}
return bDone;
-@@ -755,6 +877,11 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
+@@ -755,6 +900,11 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
return FALSE;
}
@@ -1144,10 +1248,10 @@
USHORT nContFlags = IDF_NONE;
if (nFlags & IDF_CONTENTS)
diff --git sc/source/ui/view/viewfun4.cxx sc/source/ui/view/viewfun4.cxx
-index d3bf9ec..14bc277 100644
+index d3bf9ec..1ff54ec 100644
--- sc/source/ui/view/viewfun4.cxx
+++ sc/source/ui/view/viewfun4.cxx
-@@ -81,6 +81,7 @@
+@@ -81,9 +81,36 @@
#include "impex.hxx"
#include "editutil.hxx"
#include "editable.hxx"
@@ -1155,7 +1259,36 @@
using namespace com::sun::star;
-@@ -188,6 +189,148 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow,
++
++#include <stdio.h>
++#include <string>
++
++namespace {
++
++class StackPrinter
++{
++public:
++ explicit StackPrinter(const char* msg) :
++ msMsg(msg)
++ {
++ fprintf(stdout, "%s: --begin\n", msMsg.c_str());
++ }
++
++ ~StackPrinter()
++ {
++ fprintf(stdout, "%s: --end\n", msMsg.c_str());
++ }
++
++private:
++ ::std::string msMsg;
++};
++
++}
++
+ // STATIC DATA -----------------------------------------------------------
+
+ BOOL bPasteIsDrop = FALSE;
+@@ -188,6 +215,128 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow,
}
}
@@ -1184,27 +1317,6 @@
+ sal_uInt16 nFlags, ScDocument* pClipDoc, sal_uInt16 nFunction,
+ bool bSkipEmpty, bool bTranspose, bool bAsLink, InsCellCmd eMoveMode, sal_uInt16 nUndoExtraFlags)
+{
-+ StackPrinter __stack_printer__("ScViewFunc::PasteMultiRangesFromClip");
-+ ScClipParam& rClipParam = pClipDoc->GetClipParam();
-+ switch (rClipParam.meDirection)
-+ {
-+ case ScClipParam::Column:
-+ fprintf(stdout, "ScViewFunc::PasteMultiRangesFromClip: column direction\n");
-+ break;
-+ case ScClipParam::Row:
-+ fprintf(stdout, "ScViewFunc::PasteMultiRangesFromClip: row direction\n");
-+ break;
-+ default:
-+ fprintf(stdout, "ScViewFunc::PasteMultiRangesFromClip: other\n");
-+ }
-+
-+ String aStr;
-+ rClipParam.maRanges.Format(aStr, SCR_ABS_3D, pClipDoc);
-+ fprintf(stdout, "ScViewFunc::PasteMultiRangesFromClip: ranges = '%s'\n",
-+ rtl::OUStringToOString(aStr, RTL_TEXTENCODING_UTF8).getStr());
-+
-+ fprintf(stdout, "ScViewFunc::PasteMultiRangesFromClip: skip empty? (%d)\n", bSkipEmpty);
-+
+ sal_uInt16 nContFlags = IDF_NONE;
+ if (nFlags & IDF_CONTENTS)
+ nContFlags |= IDF_CONTENTS;
@@ -1222,6 +1334,7 @@
+ ScDocShell* pDocSh = rViewData.GetDocShell();
+ ScMarkData aMark(rViewData.GetMarkData());
+ const ScAddress& rCurPos = rViewData.GetCurPos();
++ ScClipParam& rClipParam = pClipDoc->GetClipParam();
+ SCCOL nColSize = rClipParam.getPasteColSize();
+ SCROW nRowSize = rClipParam.getPasteRowSize();
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]