summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2009-09-18 12:31:43 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2009-09-18 12:31:43 +0000
commitec92cc9ab227d63231723c5f673b243217f52009 (patch)
treec906c04113d9cd624b26e1c53d3b40bad5e6f6ad
parent7015d343b762f06aef9117b0e0232d5a25ed5a02 (diff)
CWS-TOOLING: integrate CWS calc32stopper1
2009-09-15 15:43:23 +0200 dr r276180 : newpic 2009-09-15 15:41:13 +0200 dr r276179 : newpic 2009-09-15 14:58:14 +0200 dr r276178 : #i104905# fixed note handling while importing from external data 2009-09-15 13:47:43 +0200 dr r276173 : #i104905# fixed note handling while importing from database 2009-09-15 11:56:00 +0200 dr r276164 : #i104155# prevent crash loading docx 2009-09-15 10:40:43 +0200 dr r276154 : #i104990# 2009-09-15 10:27:31 +0200 dr r276152 : #i104990# enable saving BIFF8 with password/encryption 2009-09-15 10:26:40 +0200 dr r276151 : #i104990# enable saving BIFF8 with password/encryption 2009-09-14 19:13:11 +0200 dr r276145 : #i105007# missing cleanup for deleted headers 2009-09-14 19:06:57 +0200 dr r276144 : #i105007# missing cleanup for deleted headers 2009-09-14 18:53:39 +0200 dr r276143 : #i104915# prevent crashes and misbehaviour when dealing with note cells: enter matrix, enter mult.op 2009-09-14 13:57:00 +0200 dr r276109 : #160184# make drilldown working in exported pivottables, ported to DEV300 2009-09-11 15:16:08 +0200 nn r276068 : #i104987# MoveBlock: pass bCut parameter 2009-09-11 15:15:22 +0200 nn r276067 : #i104986# CopyToClip: correct order of parameters 2009-09-11 09:45:59 +0200 dr r276053 : correct milestone
-rw-r--r--sc/source/core/data/postit.cxx11
-rw-r--r--sc/source/core/tool/interpr4.cxx4
-rw-r--r--sc/source/filter/excel/xepivot.cxx3
-rw-r--r--sc/source/ui/docshell/arealink.cxx10
-rw-r--r--sc/source/ui/docshell/dbdocimp.cxx19
-rw-r--r--sc/source/ui/docshell/docfunc.cxx6
-rw-r--r--sc/source/ui/docshell/docsh.cxx46
-rw-r--r--sc/source/ui/docshell/impex.cxx4
-rw-r--r--sc/source/ui/undo/undoblk.cxx6
-rw-r--r--sc/source/ui/undo/undoblk3.cxx20
-rw-r--r--sc/source/ui/undo/undodat.cxx34
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx2
-rw-r--r--sc/source/ui/view/viewfun3.cxx2
-rw-r--r--sc/source/ui/view/viewfun4.cxx2
14 files changed, 86 insertions, 83 deletions
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index a7c5753e4..7a08f352e 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -652,7 +652,9 @@ void ScPostIt::CreateCaptionFromInitData( const ScAddress& rPos ) const
been created already. */
OSL_ENSURE( !mrDoc.IsUndo() && !mrDoc.IsClipboard(), "ScPostIt::CreateCaptionFromInitData - note caption should not be created in undo/clip documents" );
- if( !maNoteData.mpCaption )
+ /* #i104915# Never try to create notes in Undo document, leads to
+ crash due to missing document members (e.g. row height array). */
+ if( !maNoteData.mpCaption && !mrDoc.IsUndo() )
{
// ScNoteCaptionCreator c'tor creates the caption and inserts it into the document and maNoteData
ScNoteCaptionCreator aCreator( mrDoc, rPos, maNoteData );
@@ -704,8 +706,13 @@ void ScPostIt::CreateCaption( const ScAddress& rPos, const SdrCaptionObj* pCapti
OSL_ENSURE( !maNoteData.mpCaption, "ScPostIt::CreateCaption - unexpected caption object found" );
maNoteData.mpCaption = 0;
- // drawing layer may be missing, if a note is copied into a clipboard document
+ /* #i104915# Never try to create notes in Undo document, leads to
+ crash due to missing document members (e.g. row height array). */
OSL_ENSURE( !mrDoc.IsUndo(), "ScPostIt::CreateCaption - note caption should not be created in undo documents" );
+ if( mrDoc.IsUndo() )
+ return;
+
+ // drawing layer may be missing, if a note is copied into a clipboard document
if( mrDoc.IsClipboard() )
mrDoc.InitDrawLayer();
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 1ef923197..1f8fb9efc 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -3279,7 +3279,7 @@ void ScInterpreter::ScCalcTeam()
if( !bShown )
{
ShowTheTeam();
- String aTeam( RTL_CONSTASCII_USTRINGPARAM( "Ballach, Nebel, Rentz, Rathke, Marmion" ) );
+ String aTeam( RTL_CONSTASCII_USTRINGPARAM( "Nebel, Benisch, Rentz, Rathke" ) );
if ( (GetByte() == 1) && ::rtl::math::approxEqual( GetDouble(), 1996) )
aTeam.AppendAscii( " (a word with 'B': -Olk, -Nietsch, -Daeumling)" );
PushString( aTeam );
diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index d7bf0b3c1..7680b03ca 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -662,6 +662,9 @@ XclExpPivotCache::XclExpPivotCache( const XclExpRoot& rRoot, const ScDPObject& r
if( 2 * (nDocRow2 - nDocRow1) < (nSrcRow2 - nSrcRow1) )
::set_flag( maPCInfo.mnFlags, EXC_SXDB_SAVEDATA, false );
+ // #160184# Excel must refresh tables to make drilldown working
+ ::set_flag( maPCInfo.mnFlags, EXC_SXDB_REFRESH_LOAD );
+
// adjust row indexes, keep one row of empty area to surely have the empty cache item
if( nSrcRow1 < nDocRow1 )
nSrcRow1 = nDocRow1 - 1;
diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx
index 1a686d93b..bd37d41f3 100644
--- a/sc/source/ui/docshell/arealink.cxx
+++ b/sc/source/ui/docshell/arealink.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -355,12 +355,12 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
}
else
pUndoDoc->InitUndo( pDoc, nDestTab, nDestTab ); // nur Zieltabelle
- pDoc->CopyToDocument( aOldRange, IDF_ALL, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( aOldRange, IDF_ALL & ~IDF_NOTE, FALSE, pUndoDoc );
}
else // ohne Einfuegen
{
pUndoDoc->InitUndo( pDoc, nDestTab, nDestTab ); // nur Zieltabelle
- pDoc->CopyToDocument( aMaxRange, IDF_ALL, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( aMaxRange, IDF_ALL & ~IDF_NOTE, FALSE, pUndoDoc );
}
}
@@ -370,7 +370,7 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
if (bDoInsert)
pDoc->FitBlock( aOldRange, aNewRange ); // incl. loeschen
else
- pDoc->DeleteAreaTab( aMaxRange, IDF_ALL );
+ pDoc->DeleteAreaTab( aMaxRange, IDF_ALL & ~IDF_NOTE );
// Daten kopieren
@@ -426,7 +426,7 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
{
pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
pRedoDoc->InitUndo( pDoc, nDestTab, nDestTab );
- pDoc->CopyToDocument( aNewRange, IDF_ALL, FALSE, pRedoDoc );
+ pDoc->CopyToDocument( aNewRange, IDF_ALL & ~IDF_NOTE, FALSE, pRedoDoc );
pImpl->m_pDocSh->GetUndoManager()->AddUndoAction(
new ScUndoUpdateAreaLink( pImpl->m_pDocSh,
diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx
index c283b5da3..6b6bcb107 100644
--- a/sc/source/ui/docshell/dbdocimp.cxx
+++ b/sc/source/ui/docshell/dbdocimp.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -576,18 +576,21 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
if (bRecord)
{
+ // do not touch notes (ScUndoImportData does not support drawing undo)
+ sal_uInt16 nCopyFlags = IDF_ALL & ~IDF_NOTE;
+
// nFormulaCols is set only if column count is unchanged
pDoc->CopyToDocument( rParam.nCol1, rParam.nRow1, nTab,
nEndCol+nFormulaCols, nEndRow, nTab,
- IDF_ALL, FALSE, pUndoDoc );
+ nCopyFlags, FALSE, pUndoDoc );
if ( rParam.nCol2 > nEndCol )
pDoc->CopyToDocument( nEndCol+1, rParam.nRow1, nTab,
nUndoEndCol, nUndoEndRow, nTab,
- IDF_ALL, FALSE, pUndoDoc );
+ nCopyFlags, FALSE, pUndoDoc );
if ( rParam.nRow2 > nEndRow )
pDoc->CopyToDocument( rParam.nCol1, nEndRow+1, nTab,
nUndoEndCol+nFormulaCols, nUndoEndRow, nTab,
- IDF_ALL, FALSE, pUndoDoc );
+ nCopyFlags, FALSE, pUndoDoc );
}
//
@@ -601,7 +604,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
ScRange aDelRange( rParam.nCol1, rParam.nRow1, nTab,
rParam.nCol2, rParam.nRow2, nTab );
- pDoc->DeleteAreaTab( aDelRange, IDF_ALL ); // ohne die Formeln
+ pDoc->DeleteAreaTab( aDelRange, IDF_ALL & ~IDF_NOTE ); // ohne die Formeln
ScRange aOld( rParam.nCol1, rParam.nRow1, nTab,
rParam.nCol2+nFormulaCols, rParam.nRow2, nTab );
@@ -611,10 +614,10 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
}
else if ( nEndCol < rParam.nCol2 ) // DeleteArea calls PutInOrder
pDoc->DeleteArea( nEndCol+1, rParam.nRow1, rParam.nCol2, rParam.nRow2,
- aNewMark, IDF_CONTENTS );
+ aNewMark, IDF_CONTENTS & ~IDF_NOTE );
// CopyToDocument doesn't remove contents
- pDoc->DeleteAreaTab( rParam.nCol1, rParam.nRow1, nEndCol, nEndRow, nTab, IDF_CONTENTS );
+ pDoc->DeleteAreaTab( rParam.nCol1, rParam.nRow1, nEndCol, nEndRow, nTab, IDF_CONTENTS & ~IDF_NOTE );
// #41216# remove each column from ImportDoc after copying to reduce memory usage
BOOL bOldAutoCalc = pDoc->GetAutoCalc();
@@ -671,7 +674,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
if (nFormulaCols > 0) // include filled formulas for redo
pDoc->CopyToDocument( rParam.nCol1, rParam.nRow1, nTab,
nEndCol+nFormulaCols, nEndRow, nTab,
- IDF_ALL, FALSE, pRedoDoc );
+ IDF_ALL & ~IDF_NOTE, FALSE, pRedoDoc );
ScDBData* pRedoDBData = pDBData ? new ScDBData( *pDBData ) : NULL;
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index b68d9a36b..5d24180e8 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -2277,7 +2277,7 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
}
ScDrawLayer::SetGlobalDrawPersist(aDragShellRef);
- ScClipParam aClipParam(ScRange(nStartCol, nStartRow, 0, nEndCol, nEndRow, 0), false);
+ ScClipParam aClipParam(ScRange(nStartCol, nStartRow, 0, nEndCol, nEndRow, 0), bCut);
pDoc->CopyToClip(aClipParam, pClipDoc, &aSourceMark, false, bScenariosAdded, true);
ScDrawLayer::SetGlobalDrawPersist(NULL);
@@ -3577,7 +3577,7 @@ BOOL ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark,
//! auch bei Undo selektierte Tabellen beruecksichtigen
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( pDoc, nStartTab, nEndTab );
- pDoc->CopyToDocument( rRange, IDF_ALL, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( rRange, IDF_ALL & ~IDF_NOTE, FALSE, pUndoDoc );
}
// use TokenArray if given, string (and flags) otherwise
@@ -3665,7 +3665,7 @@ BOOL ScDocFunc::TabOp( const ScRange& rRange, const ScMarkData* pTabMark,
//! auch bei Undo selektierte Tabellen beruecksichtigen
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( pDoc, nStartTab, nEndTab );
- pDoc->CopyToDocument( rRange, IDF_ALL, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( rRange, IDF_ALL & ~IDF_NOTE, FALSE, pUndoDoc );
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoTabOp( &rDocShell,
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index f76b4a40f..5d810f0ff 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -1856,39 +1856,29 @@ BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed )
aDocument.SetExtDocOptions( pExtDocOpt = new ScExtDocOptions );
pViewShell->GetViewData()->WriteExtOptions( *pExtDocOpt );
-#if ENABLE_SHEET_PROTECTION
- bool bNeedRetypePassDlg = ScPassHashHelper::needsPassHashRegen(aDocument, PASSHASH_XL);
- if (bNeedRetypePassDlg && !pViewShell->ExecuteRetypePassDlg(PASSHASH_XL))
- {
- SetError( ERRCODE_ABORT );
- return false;
- }
-#else
-
- do
+ /* #115980# #i104990# If the imported document contains a medium
+ password, determine if we can save it, otherwise ask the users
+ whether they want to save without it. */
+ if( !::sfx2::CheckMSPasswordCapabilityForExport( aFltName ) )
{
- SfxItemSet* pSet = rMed.GetItemSet();
- if (!pSet)
- break;
-
- const SfxPoolItem* pItem = NULL;
- if (SFX_ITEM_SET != pSet->GetItemState(SID_PASSWORD, sal_True, &pItem))
- // password is not set.
- break;
-
- /* #115980 #If the imported document contained an encrypted password -
- determine if we should save without it. */
- bDoSave = ScWarnPassword::WarningOnPassword( rMed );
-
- if (bDoSave)
+ SfxItemSet* pItemSet = rMed.GetItemSet();
+ const SfxPoolItem* pItem = 0;
+ if( pItemSet && pItemSet->GetItemState( SID_PASSWORD, sal_True, &pItem ) == SFX_ITEM_SET )
{
- // #i42858# warn only one time
- pSet->ClearItem(SID_PASSWORD);
+ bDoSave = ScWarnPassword::WarningOnPassword( rMed );
+ // #i42858# remove password from medium (warn only one time)
+ if( bDoSave )
+ pItemSet->ClearItem( SID_PASSWORD );
}
}
- while (false);
-#endif
+#if ENABLE_SHEET_PROTECTION
+ if( bDoSave )
+ {
+ bool bNeedRetypePassDlg = ScPassHashHelper::needsPassHashRegen( aDocument, PASSHASH_XL );
+ bDoSave = !bNeedRetypePassDlg || pViewShell->ExecuteRetypePassDlg( PASSHASH_XL );
+ }
+#endif
}
if( bDoSave )
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 0590de5d0..844e9b7ae 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -253,7 +253,7 @@ BOOL ScImportExport::StartPaste()
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( pDoc, aRange.aStart.Tab(), aRange.aEnd.Tab() );
- pDoc->CopyToDocument( aRange, IDF_ALL, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( aRange, IDF_ALL | IDF_NOCAPTIONS, FALSE, pUndoDoc );
}
return TRUE;
}
@@ -270,7 +270,7 @@ void ScImportExport::EndPaste()
{
ScDocument* pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
pRedoDoc->InitUndo( pDoc, aRange.aStart.Tab(), aRange.aEnd.Tab() );
- pDoc->CopyToDocument( aRange, IDF_ALL, FALSE, pRedoDoc );
+ pDoc->CopyToDocument( aRange, IDF_ALL | IDF_NOCAPTIONS, FALSE, pRedoDoc );
ScMarkData aDestMark;
aDestMark.SelectOneTable( aRange.aStart.Tab() );
pDocSh->GetUndoManager()->AddUndoAction(
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index 20148cce1..41901be48 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -442,7 +442,7 @@ void ScUndoDeleteCells::DoChange( const BOOL bUndo )
for( i=0; i<nCount && bUndo; i++ )
{
pRefUndoDoc->CopyToDocument( aEffRange.aStart.Col(), aEffRange.aStart.Row(), pTabs[i], aEffRange.aEnd.Col(), aEffRange.aEnd.Row(), pTabs[i]+pScenarios[i],
- IDF_ALL, FALSE, pDoc );
+ IDF_ALL | IDF_NOCAPTIONS, FALSE, pDoc );
}
ScRange aWorkRange( aEffRange );
@@ -1729,8 +1729,8 @@ void __EXPORT ScUndoEnterMatrix::Undo()
ScDocument* pDoc = pDocShell->GetDocument();
- pDoc->DeleteAreaTab( aBlockRange, IDF_ALL );
- pUndoDoc->CopyToDocument( aBlockRange, IDF_ALL, FALSE, pDoc );
+ pDoc->DeleteAreaTab( aBlockRange, IDF_ALL & ~IDF_NOTE );
+ pUndoDoc->CopyToDocument( aBlockRange, IDF_ALL & ~IDF_NOTE, FALSE, pDoc );
pDocShell->PostPaint( aBlockRange, PAINT_GRID );
pDocShell->PostDataChanged();
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index 879acec53..3de10f961 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -1340,8 +1340,8 @@ void __EXPORT ScUndoTabOp::Undo()
pDocShell->UpdatePaintExt( nExtFlags, aRange );
ScDocument* pDoc = pDocShell->GetDocument();
- pDoc->DeleteAreaTab( aRange,IDF_ALL );
- pUndoDoc->CopyToDocument( aRange, IDF_ALL, FALSE, pDoc );
+ pDoc->DeleteAreaTab( aRange,IDF_ALL & ~IDF_NOTE );
+ pUndoDoc->CopyToDocument( aRange, IDF_ALL & ~IDF_NOTE, FALSE, pDoc );
pDocShell->PostPaint( aRange, PAINT_GRID, nExtFlags );
pDocShell->PostDataChanged();
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
@@ -2023,14 +2023,14 @@ void ScUndoUpdateAreaLink::DoChange( const BOOL bUndo ) const
if ( bWithInsert )
{
pDoc->FitBlock( aNewRange, aOldRange );
- pDoc->DeleteAreaTab( aOldRange, IDF_ALL );
- pUndoDoc->UndoToDocument( aOldRange, IDF_ALL, FALSE, pDoc );
+ pDoc->DeleteAreaTab( aOldRange, IDF_ALL & ~IDF_NOTE );
+ pUndoDoc->UndoToDocument( aOldRange, IDF_ALL & ~IDF_NOTE, FALSE, pDoc );
}
else
{
ScRange aCopyRange( aOldRange.aStart, ScAddress(nEndX,nEndY,nEndZ) );
- pDoc->DeleteAreaTab( aCopyRange, IDF_ALL );
- pUndoDoc->CopyToDocument( aCopyRange, IDF_ALL, FALSE, pDoc );
+ pDoc->DeleteAreaTab( aCopyRange, IDF_ALL & ~IDF_NOTE );
+ pUndoDoc->CopyToDocument( aCopyRange, IDF_ALL & ~IDF_NOTE, FALSE, pDoc );
}
}
else
@@ -2038,14 +2038,14 @@ void ScUndoUpdateAreaLink::DoChange( const BOOL bUndo ) const
if ( bWithInsert )
{
pDoc->FitBlock( aOldRange, aNewRange );
- pDoc->DeleteAreaTab( aNewRange, IDF_ALL );
- pRedoDoc->CopyToDocument( aNewRange, IDF_ALL, FALSE, pDoc );
+ pDoc->DeleteAreaTab( aNewRange, IDF_ALL & ~IDF_NOTE );
+ pRedoDoc->CopyToDocument( aNewRange, IDF_ALL & ~IDF_NOTE, FALSE, pDoc );
}
else
{
ScRange aCopyRange( aOldRange.aStart, ScAddress(nEndX,nEndY,nEndZ) );
- pDoc->DeleteAreaTab( aCopyRange, IDF_ALL );
- pRedoDoc->CopyToDocument( aCopyRange, IDF_ALL, FALSE, pDoc );
+ pDoc->DeleteAreaTab( aCopyRange, IDF_ALL & ~IDF_NOTE );
+ pRedoDoc->CopyToDocument( aCopyRange, IDF_ALL & ~IDF_NOTE, FALSE, pDoc );
}
}
diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx
index 80d82b8bc..9b5edcd99 100644
--- a/sc/source/ui/undo/undodat.cxx
+++ b/sc/source/ui/undo/undodat.cxx
@@ -1302,8 +1302,8 @@ void __EXPORT ScUndoImportData::Undo()
for (SCCOL nCopyCol = nCol1; nCopyCol <= nCol2; nCopyCol++)
{
pDoc->CopyToDocument( nCopyCol,nRow1,nTab, nCopyCol,nRow2,nTab,
- IDF_CONTENTS, FALSE, pRedoDoc );
- pDoc->DeleteAreaTab( nCopyCol,nRow1, nCopyCol,nRow2, nTab, IDF_CONTENTS );
+ IDF_CONTENTS & ~IDF_NOTE, FALSE, pRedoDoc );
+ pDoc->DeleteAreaTab( nCopyCol,nRow1, nCopyCol,nRow2, nTab, IDF_CONTENTS & ~IDF_NOTE );
pDoc->DoColResize( nTab, nCopyCol, nCopyCol, 0 );
}
pDoc->SetAutoCalc( bOldAutoCalc );
@@ -1321,7 +1321,7 @@ void __EXPORT ScUndoImportData::Undo()
pRedoDBData->GetArea( aNew );
pDoc->DeleteAreaTab( aNew.aStart.Col(), aNew.aStart.Row(),
- aNew.aEnd.Col(), aNew.aEnd.Row(), nTab, IDF_ALL );
+ aNew.aEnd.Col(), aNew.aEnd.Row(), nTab, IDF_ALL & ~IDF_NOTE );
aOld.aEnd.SetCol( aOld.aEnd.Col() + nFormulaCols ); // FitBlock auch fuer Formeln
aNew.aEnd.SetCol( aNew.aEnd.Col() + nFormulaCols );
@@ -1329,11 +1329,11 @@ void __EXPORT ScUndoImportData::Undo()
}
else
pDoc->DeleteAreaTab( aImportParam.nCol1,aImportParam.nRow1,
- nEndCol,nEndRow, nTab, IDF_ALL );
+ nEndCol,nEndRow, nTab, IDF_ALL & ~IDF_NOTE );
pUndoDoc->CopyToDocument( aImportParam.nCol1,aImportParam.nRow1,nTab,
nEndCol+nFormulaCols,nEndRow,nTab,
- IDF_ALL, FALSE, pDoc );
+ IDF_ALL & ~IDF_NOTE, FALSE, pDoc );
if (pCurrentData)
{
@@ -1395,16 +1395,16 @@ void __EXPORT ScUndoImportData::Redo()
pDoc->FitBlock( aOld, aNew );
pDoc->DeleteAreaTab( aNew.aStart.Col(), aNew.aStart.Row(),
- aNew.aEnd.Col(), aNew.aEnd.Row(), nTab, IDF_ALL );
+ aNew.aEnd.Col(), aNew.aEnd.Row(), nTab, IDF_ALL & ~IDF_NOTE );
- pRedoDoc->CopyToDocument( aNew, IDF_ALL, FALSE, pDoc ); // incl. Formeln
+ pRedoDoc->CopyToDocument( aNew, IDF_ALL & ~IDF_NOTE, FALSE, pDoc ); // incl. Formeln
}
else
{
pDoc->DeleteAreaTab( aImportParam.nCol1,aImportParam.nRow1,
- nEndCol,nEndRow, nTab, IDF_ALL );
+ nEndCol,nEndRow, nTab, IDF_ALL & ~IDF_NOTE );
pRedoDoc->CopyToDocument( aImportParam.nCol1,aImportParam.nRow1,nTab,
- nEndCol,nEndRow,nTab, IDF_ALL, FALSE, pDoc );
+ nEndCol,nEndRow,nTab, IDF_ALL & ~IDF_NOTE, FALSE, pDoc );
}
if (pCurrentData)
@@ -1633,7 +1633,7 @@ BOOL __EXPORT ScUndoRepeatDB::CanRepeat(SfxRepeatTarget& rTarget) const
//UNUSED2008-05 //
//UNUSED2008-05 // Pivot-Tabellen
//UNUSED2008-05 //
-//UNUSED2008-05
+//UNUSED2008-05
//UNUSED2008-05 ScUndoPivot::ScUndoPivot( ScDocShell* pNewDocShell,
//UNUSED2008-05 const ScArea& rOld, const ScArea& rNew,
//UNUSED2008-05 ScDocument* pOldDoc, ScDocument* pNewDoc,
@@ -1657,13 +1657,13 @@ BOOL __EXPORT ScUndoRepeatDB::CanRepeat(SfxRepeatTarget& rTarget) const
//UNUSED2008-05 aOldTag = pOldPivot->GetTag();
//UNUSED2008-05 }
//UNUSED2008-05 }
-//UNUSED2008-05
+//UNUSED2008-05
//UNUSED2008-05 __EXPORT ScUndoPivot::~ScUndoPivot()
//UNUSED2008-05 {
//UNUSED2008-05 delete pOldUndoDoc;
//UNUSED2008-05 delete pNewUndoDoc;
//UNUSED2008-05 }
-//UNUSED2008-05
+//UNUSED2008-05
//UNUSED2008-05 String __EXPORT ScUndoPivot::GetComment() const
//UNUSED2008-05 {
//UNUSED2008-05 USHORT nIndex;
@@ -1673,16 +1673,16 @@ BOOL __EXPORT ScUndoRepeatDB::CanRepeat(SfxRepeatTarget& rTarget) const
//UNUSED2008-05 nIndex = STR_UNDO_PIVOT_NEW;
//UNUSED2008-05 else
//UNUSED2008-05 nIndex = STR_UNDO_PIVOT_DELETE;
-//UNUSED2008-05
+//UNUSED2008-05
//UNUSED2008-05 return ScGlobal::GetRscString( nIndex );
//UNUSED2008-05 }
-//UNUSED2008-05
+//UNUSED2008-05
//UNUSED2008-05 void __EXPORT ScUndoPivot::Undo()
//UNUSED2008-05 {
//UNUSED2008-05 BeginUndo();
-//UNUSED2008-05
+//UNUSED2008-05
//UNUSED2008-05 ScDocument* pDoc = pDocShell->GetDocument();
-//UNUSED2008-05
+//UNUSED2008-05
//UNUSED2008-05 if (pNewUndoDoc)
//UNUSED2008-05 {
//UNUSED2008-05 pDoc->DeleteAreaTab( aNewArea.nColStart,aNewArea.nRowStart,
@@ -1699,7 +1699,7 @@ BOOL __EXPORT ScUndoRepeatDB::CanRepeat(SfxRepeatTarget& rTarget) const
//UNUSED2008-05 aOldArea.nColEnd, aOldArea.nRowEnd, aOldArea.nTab,
//UNUSED2008-05 IDF_ALL, FALSE, pDoc );
//UNUSED2008-05 }
-//UNUSED2008-05
+//UNUSED2008-05
//UNUSED2008-05 ScPivotCollection* pPivotCollection = pDoc->GetPivotCollection();
//UNUSED2008-05 if ( pNewUndoDoc )
//UNUSED2008-05 {
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 7c2c29e2d..f776b050e 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -1093,7 +1093,7 @@ BOOL lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange,
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( pDoc, nTab, nTab );
- pDoc->CopyToDocument( rRange, IDF_CONTENTS, FALSE, pUndoDoc );
+ pDoc->CopyToDocument( rRange, IDF_CONTENTS|IDF_NOCAPTIONS, FALSE, pUndoDoc );
}
pDoc->DeleteAreaTab( nStartCol, nStartRow, nEndCol, nEndRow, nTab, IDF_CONTENTS );
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 266b45689..8271bb1ef 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -465,7 +465,7 @@ BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, BOOL bCut, BOOL bApi, BOOL bI
if (!bValidRanges)
break;
- pDoc->CopyToClip(aClipParam, pDocClip.get(), false, &rMark, false, bIncludeObjects);
+ pDoc->CopyToClip(aClipParam, pDocClip.get(), &rMark, false, false, bIncludeObjects);
ScChangeTrack* pChangeTrack = pDoc->GetChangeTrack();
if ( pChangeTrack )
diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx
index 62cfd03ed..f33bc74ae 100644
--- a/sc/source/ui/view/viewfun4.cxx
+++ b/sc/source/ui/view/viewfun4.cxx
@@ -155,7 +155,7 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow,
{
ScDocument* pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
pRedoDoc->InitUndo( pDoc, nTab, nTab );
- pDoc->CopyToDocument( nStartCol,nStartRow,nTab, nStartCol,nEndRow,nTab, IDF_ALL, FALSE, pRedoDoc );
+ pDoc->CopyToDocument( nStartCol,nStartRow,nTab, nStartCol,nEndRow,nTab, IDF_ALL|IDF_NOCAPTIONS, FALSE, pRedoDoc );
ScMarkData aDestMark;
aDestMark.SelectOneTable( nTab );