summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui')
-rwxr-xr-xsc/source/ui/app/inputwin.cxx4
-rw-r--r--sc/source/ui/cctrl/dpcontrol.cxx2
-rw-r--r--sc/source/ui/docshell/docfunc.cxx11
-rw-r--r--sc/source/ui/docshell/docsh.cxx1
-rw-r--r--sc/source/ui/docshell/docsh4.cxx368
-rw-r--r--sc/source/ui/inc/docsh.hxx8
-rw-r--r--sc/source/ui/inc/prevwsh.hxx4
-rw-r--r--sc/source/ui/inc/tabvwsh.hxx6
-rw-r--r--sc/source/ui/inc/ui_pch.hxx3
-rw-r--r--sc/source/ui/inc/viewfunc.hxx5
-rw-r--r--sc/source/ui/src/scstring.src14
-rw-r--r--sc/source/ui/unoobj/addruno.cxx27
-rw-r--r--sc/source/ui/unoobj/docuno.cxx63
-rw-r--r--sc/source/ui/unoobj/fmtuno.cxx41
-rw-r--r--sc/source/ui/vba/vbasheetobject.cxx6
-rw-r--r--sc/source/ui/view/drawview.cxx12
-rw-r--r--sc/source/ui/view/formatsh.cxx8
-rw-r--r--sc/source/ui/view/prevwsh.cxx95
-rw-r--r--[-rwxr-xr-x]sc/source/ui/view/printfun.cxx0
-rw-r--r--sc/source/ui/view/tabview3.cxx4
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx124
-rw-r--r--sc/source/ui/view/viewfun4.cxx4
-rw-r--r--sc/source/ui/view/viewfunc.cxx4
23 files changed, 85 insertions, 729 deletions
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index b028a0a153ce..4dcd7eb4da86 100755
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -770,11 +770,11 @@ ScTextWnd::ScTextWnd( Window* pParent )
__EXPORT ScTextWnd::~ScTextWnd()
{
- delete pEditView;
- delete pEditEngine;
while (!maAccTextDatas.empty()) {
maAccTextDatas.back()->Dispose();
}
+ delete pEditView;
+ delete pEditEngine;
}
void __EXPORT ScTextWnd::Paint( const Rectangle& rRec )
diff --git a/sc/source/ui/cctrl/dpcontrol.cxx b/sc/source/ui/cctrl/dpcontrol.cxx
index b90a51ed6bee..f9e5a4d7679b 100644
--- a/sc/source/ui/cctrl/dpcontrol.cxx
+++ b/sc/source/ui/cctrl/dpcontrol.cxx
@@ -35,7 +35,7 @@
#include <vcl/outdev.hxx>
#include <vcl/settings.hxx>
-#include <vcl/wintypes.hxx>
+#include <tools/wintypes.hxx>
#include <vcl/decoview.hxx>
#include "strload.hxx"
#include "global.hxx"
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 038d0a72e824..50d95fbd677d 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -3126,6 +3126,8 @@ BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRa
ScSizeMode eMode, USHORT nSizeTwips,
BOOL bRecord, BOOL bApi )
{
+ ScDocShellModificator aModificator( rDocShell );
+
if (!nRangeCnt)
return TRUE;
@@ -3287,6 +3289,7 @@ BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRa
pDoc->UpdatePageBreaks( nTab );
rDocShell.PostPaint(0,0,nTab,MAXCOL,MAXROW,nTab,PAINT_ALL);
+ aModificator.SetDocumentModified();
return bSuccess;
}
@@ -4866,9 +4869,11 @@ BOOL ScDocFunc::InsertAreaLink( const String& rFile, const String& rFilter,
}
// Update hat sein eigenes Undo
-
- pLink->SetDoInsert(bFitBlock); // beim ersten Update ggf. nichts einfuegen
- pLink->Update(); // kein SetInCreate -> Update ausfuehren
+ if (pDoc->IsExecuteLinkEnabled())
+ {
+ pLink->SetDoInsert(bFitBlock); // beim ersten Update ggf. nichts einfuegen
+ pLink->Update(); // kein SetInCreate -> Update ausfuehren
+ }
pLink->SetDoInsert(TRUE); // Default = TRUE
SfxBindings* pBindings = rDocShell.GetViewBindings();
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index e7089349fdb7..901363785cc9 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -2605,6 +2605,7 @@ void ScDocShell::SetDocumentModified( BOOL bIsModified /* = TRUE */ )
if ( pPaintLockData && bIsModified )
{
//! BCA_BRDCST_ALWAYS etc. also needed here?
+ aDocument.InvalidateTableArea(); // #i105279# needed here
aDocument.BroadcastUno( SfxSimpleHint( SFX_HINT_DATACHANGED ) );
pPaintLockData->SetModified(); // spaeter...
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index bba756b397cb..78287257c080 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -55,7 +55,6 @@ using namespace ::com::sun::star;
#include <svtools/sfxecode.hxx>
#include <svx/ofaitem.hxx>
#include <sot/formats.hxx>
-#include <svtools/printdlg.hxx>
#include <svl/whiter.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/waitobj.hxx>
@@ -1828,373 +1827,6 @@ void ScDocShell::GetStatePageStyle( SfxViewShell& /* rCaller */,
}
}
-void lcl_GetPrintData( ScDocShell* pDocShell /*in*/,
- ScDocument* pDocument /*in*/, SfxPrinter* pPrinter /*in*/,
- PrintDialog* pPrintDialog /*in*/, bool bForceSelected /*in*/,
- ScMarkData* pMarkData /*inout*/, bool& rbHasOptions /*out*/,
- ScPrintOptions& rOptions /*out*/, bool& rbAllTabs /*out*/,
- long& rnTotalPages /*out*/, long aPageArr[] /*out*/,
- MultiSelection& rPageRanges /*out*/, ScRange** ppMarkedRange /*out*/ )
-{
- // get settings from print options sub-dialog
- const SfxItemSet& rOptionSet = pPrinter->GetOptions();
- const SfxPoolItem* pItem;
- rbHasOptions = ( rOptionSet.GetItemState( SID_SCPRINTOPTIONS, FALSE, &pItem ) == SFX_ITEM_SET );
- if ( rbHasOptions )
- {
- rOptions = ((const ScTpPrintItem*)pItem)->GetPrintOptions();
- }
- else
- {
- // use configuration
- rOptions = SC_MOD()->GetPrintOptions();
- }
-
- // update all pending row heights with a single progress bar,
- // instead of a separate progress for each sheet from ScPrintFunc
- pDocShell->UpdatePendingRowHeights( MAXTAB, true );
-
- // get number of total pages
- rnTotalPages = 0;
- SCTAB nTabCount = pDocument->GetTableCount();
- for ( SCTAB nTab = 0; nTab < nTabCount; ++nTab )
- {
- ScPrintFunc aPrintFunc( pDocShell, pPrinter, nTab, 0, 0, NULL, &rOptions );
- long nThisTab = aPrintFunc.GetTotalPages();
- aPageArr[nTab] = nThisTab;
- rnTotalPages += nThisTab;
- }
-
- rPageRanges.SetTotalRange( Range( 0, RANGE_MAX ) );
- rPageRanges.Select( Range( 1, rnTotalPages ) );
-
- rbAllTabs = ( pPrintDialog ? ( pPrintDialog->GetCheckedSheetRange() == PRINTSHEETS_ALL ) : SC_MOD()->GetPrintOptions().GetAllSheets() );
- if ( bForceSelected )
- {
- rbAllTabs = false;
- }
-
- if ( ( pPrintDialog && pPrintDialog->GetCheckedSheetRange() == PRINTSHEETS_SELECTED_CELLS ) || bForceSelected )
- {
- if ( pMarkData && ( pMarkData->IsMarked() || pMarkData->IsMultiMarked() ) )
- {
- pMarkData->MarkToMulti();
- *ppMarkedRange = new ScRange;
- pMarkData->GetMultiMarkArea( **ppMarkedRange );
- pMarkData->MarkToSimple();
- }
- }
-
- PrintDialogRange eDlgOption = pPrintDialog ? pPrintDialog->GetCheckedRange() : PRINTDIALOG_ALL;
- if ( eDlgOption == PRINTDIALOG_RANGE )
- {
- rPageRanges = MultiSelection( pPrintDialog->GetRangeText() );
- }
-
- // get number of total pages if selection
- if ( !rbAllTabs )
- {
- rnTotalPages = 0;
- for ( SCTAB nTab = 0; nTab < nTabCount; ++nTab )
- {
- if ( *ppMarkedRange ) // selected range is used instead of print ranges -> page count is different
- {
- ScPrintFunc aPrintFunc( pDocShell, pPrinter, nTab, 0, 0, *ppMarkedRange, &rOptions );
- aPageArr[nTab] = aPrintFunc.GetTotalPages();
- }
- if ( !pMarkData || pMarkData->GetTableSelect( nTab ) )
- {
- rnTotalPages += aPageArr[nTab];
- }
- }
- if ( eDlgOption == PRINTDIALOG_ALL || bForceSelected )
- {
- rPageRanges.Select( Range( 1, rnTotalPages ) );
- }
- }
-}
-
-bool ScDocShell::CheckPrint( PrintDialog* pPrintDialog, ScMarkData* pMarkData, bool bForceSelected, bool bIsAPI )
-{
- SfxPrinter* pPrinter = GetPrinter();
- if ( !pPrinter )
- {
- return false;
- }
-
- bool bHasOptions = false;
- ScPrintOptions aOptions;
- bool bAllTabs = true;
- long nTotalPages = 0;
- long aPageArr[MAXTABCOUNT]; // pages per sheet
- MultiSelection aPageRanges; // pages to print
- ScRange* pMarkedRange = NULL;
-
- lcl_GetPrintData( this, &aDocument, pPrinter, pPrintDialog, bForceSelected,
- pMarkData, bHasOptions, aOptions, bAllTabs, nTotalPages,
- aPageArr, aPageRanges, &pMarkedRange );
-
- delete pMarkedRange;
-
- if ( nTotalPages == 0 )
- {
- if ( !bIsAPI )
- {
- WarningBox aWarningBox( GetActiveDialogParent(), WinBits( WB_OK ),
- String( ScResId( STR_PRINT_NOTHING ) ) );
- aWarningBox.Execute();
- }
- return false;
- }
-
- return true;
-}
-
-void ScDocShell::PreparePrint( PrintDialog* pPrintDialog, ScMarkData* pMarkData )
-{
- SfxPrinter* pPrinter = GetPrinter();
- if ( !pPrinter )
- {
- return;
- }
-
- delete pOldJobSetup; // gesetzt nur bei Fehler in StartJob()
- pOldJobSetup = new ScJobSetup( pPrinter ); // Einstellungen merken
-
- // Einstellungen fuer die erste gedruckte Seite muessen hier (vor StartJob) gesetzt werden
- //! Selection etc. mit Print() zusammenfassen !!!
- //! Seiten nur einmal zaehlen
-
- bool bHasOptions = false;
- ScPrintOptions aOptions;
- bool bAllTabs = true;
- long nTotalPages = 0;
- long aPageArr[MAXTABCOUNT]; // pages per sheet
- MultiSelection aPageRanges; // pages to print
- ScRange* pMarkedRange = NULL;
-
- lcl_GetPrintData( this, &aDocument, pPrinter, pPrintDialog, false,
- pMarkData, bHasOptions, aOptions, bAllTabs, nTotalPages,
- aPageArr, aPageRanges, &pMarkedRange );
-
- BOOL bFound = FALSE; // erste Seite gefunden
- long nTabStart = 0;
- SCTAB nTabCount = aDocument.GetTableCount();
- for ( SCTAB nTab=0; nTab<nTabCount && !bFound; nTab++ )
- {
- if ( bAllTabs || !pMarkData || pMarkData->GetTableSelect( nTab ) )
- {
- long nNext = nTabStart + aPageArr[nTab];
- BOOL bSelected = FALSE;
- for (long nP=nTabStart+1; nP<=nNext; nP++) // 1-basiert
- if (aPageRanges.IsSelected( nP )) // eine Seite von dieser Tabelle selektiert?
- bSelected = TRUE;
-
- if (bSelected)
- {
- ScPrintFunc aPrintFunc( this, pPrinter, nTab );
-
- aPrintFunc.ApplyPrintSettings(); // dann Settings fuer diese Tabelle
- bFound = TRUE;
- }
- nTabStart = nNext;
- }
- }
-
- delete pMarkedRange;
-}
-
-BOOL lcl_HasTransparent( ScDocument* pDoc, SCTAB nTab, const ScRange* pRange )
-{
- BOOL bFound = FALSE;
- ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
- if (pDrawLayer)
- {
- SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
- DBG_ASSERT(pPage,"Page ?");
- if (pPage)
- {
- Rectangle aMMRect;
- if ( pRange )
- aMMRect = pDoc->GetMMRect( pRange->aStart.Col(), pRange->aStart.Row(),
- pRange->aEnd.Col(), pRange->aEnd.Row(), nTab );
-
- SdrObjListIter aIter( *pPage, IM_DEEPNOGROUPS );
- SdrObject* pObject = aIter.Next();
- while (pObject && !bFound)
- {
- if (pObject->IsTransparent())
- {
- if ( pRange )
- {
- Rectangle aObjRect = pObject->GetLogicRect();
- if ( aObjRect.IsOver( aMMRect ) )
- bFound = TRUE;
- }
- else
- bFound = TRUE;
- }
-
- pObject = aIter.Next();
- }
- }
- }
-
- return bFound;
-}
-
-void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog,
- ScMarkData* pMarkData, Window* pDialogParent, BOOL bForceSelected, BOOL bIsAPI )
-{
- SfxPrinter* pPrinter = GetPrinter();
- if ( !pPrinter )
- {
- return;
- }
-
- bool bHasOptions = false;
- ScPrintOptions aOptions;
- bool bAllTabs = true;
- long nTotalPages = 0;
- long aPageArr[MAXTABCOUNT]; // pages per sheet
- MultiSelection aPageRanges; // pages to print
- ScRange* pMarkedRange = NULL;
-
- lcl_GetPrintData( this, &aDocument, pPrinter, pPrintDialog, bForceSelected,
- pMarkData, bHasOptions, aOptions, bAllTabs, nTotalPages,
- aPageArr, aPageRanges, &pMarkedRange );
-
- USHORT nCollateCopies = 1;
- if ( pPrintDialog && pPrintDialog->IsCollateEnabled() && pPrintDialog->IsCollateChecked() )
- nCollateCopies = pPrintDialog->GetCopyCount();
-
- // test if printed range contains transparent objects
-
- BOOL bHasTransp = FALSE;
- BOOL bAnyPrintRanges = aDocument.HasPrintRange();
- ScStyleSheetPool* pStylePool = aDocument.GetStyleSheetPool();
- SCTAB nTabCount = aDocument.GetTableCount();
- for ( SCTAB nTab=0; nTab<nTabCount && !bHasTransp; nTab++ )
- {
- if ( bAllTabs || !pMarkData || pMarkData->GetTableSelect( nTab ) )
- {
- SfxStyleSheetBase* pStyleSheet = pStylePool->Find(
- aDocument.GetPageStyle( nTab ), SFX_STYLE_FAMILY_PAGE );
- if ( pStyleSheet )
- {
- const SfxItemSet& rSet = pStyleSheet->GetItemSet();
- if ( ((const ScViewObjectModeItem&)rSet.Get(ATTR_PAGE_CHARTS)).GetValue() == VOBJ_MODE_SHOW ||
- ((const ScViewObjectModeItem&)rSet.Get(ATTR_PAGE_OBJECTS)).GetValue() == VOBJ_MODE_SHOW ||
- ((const ScViewObjectModeItem&)rSet.Get(ATTR_PAGE_DRAWINGS)).GetValue() == VOBJ_MODE_SHOW )
- {
- if ( pMarkedRange )
- bHasTransp = bHasTransp || lcl_HasTransparent( &aDocument, nTab, pMarkedRange );
- else if ( aDocument.GetPrintRangeCount(nTab) )
- {
- USHORT nRangeCount = aDocument.GetPrintRangeCount(nTab);
- for (USHORT i=0; i<nRangeCount; i++)
- bHasTransp = bHasTransp ||
- lcl_HasTransparent( &aDocument, nTab, aDocument.GetPrintRange( nTab, i ) );
- }
- else if (!bAnyPrintRanges || aDocument.IsPrintEntireSheet(nTab))
- bHasTransp = bHasTransp || lcl_HasTransparent( &aDocument, nTab, NULL );
- }
- }
- }
- }
-
- BOOL bContinue = pPrinter->InitJob( pDialogParent, !bIsAPI && bHasTransp );
-
- if ( bContinue )
- {
- for ( USHORT n=0; n<nCollateCopies; n++ )
- {
- long nTabStart = 0;
- long nDisplayStart = 0;
- long nAttrPage = 1;
- long nPrinted = 0;
-
- for ( SCTAB nTab=0; nTab<nTabCount; nTab++ )
- {
- if ( bAllTabs || !pMarkData || pMarkData->GetTableSelect( nTab ) )
- {
- FmFormView* pDrawView = NULL;
- Rectangle aFull( 0, 0, LONG_MAX, LONG_MAX );
-
- // #114135#
- ScDrawLayer* pModel = aDocument.GetDrawLayer(); // ist nicht NULL
-
- if(pModel)
- {
- pDrawView = new FmFormView( pModel, pPrinter );
- pDrawView->ShowSdrPage(pDrawView->GetModel()->GetPage(nTab));
- pDrawView->SetPrintPreview( TRUE );
- }
-
- ScPrintFunc aPrintFunc( this, pPrinter, nTab, nAttrPage, nTotalPages, pMarkedRange, &aOptions );
- aPrintFunc.SetDrawView( pDrawView );
- nPrinted += aPrintFunc.DoPrint( aPageRanges, nTabStart, nDisplayStart, TRUE, &rProgress, NULL );
-
- nTabStart += aPageArr[nTab];
- if ( aDocument.NeedPageResetAfterTab(nTab) )
- nDisplayStart = 0;
- else
- nDisplayStart += aPageArr[nTab];
- nAttrPage = aPrintFunc.GetFirstPageNo(); // behalten oder aus Vorlage
-
- delete pDrawView;
- }
- }
-
- if ( n+1 < nCollateCopies &&
- (pPrinter->GetDuplexMode() == DUPLEX_SHORTEDGE || pPrinter->GetDuplexMode() == DUPLEX_LONGEDGE) &&
- ( nPrinted % 2 ) == 1 )
- {
- // #105584# when several collated copies are printed in duplex mode, and there is
- // an odd number of pages, print an empty page between copies, so the first page of
- // the second copy isn't printed on the back of the last page of the first copy.
- // (same as in Writer ViewShell::Prt)
-
- // FIXME: needs to be adapted to XRenderable interface
- #if 0
- pPrinter->StartPage();
- pPrinter->EndPage();
- #endif
- }
- }
- }
-
- delete pMarkedRange;
-
- if (pOldJobSetup)
- {
- pPrinter->SetOrientation( pOldJobSetup->eOrientation );
- pPrinter->SetPaperBin ( pOldJobSetup->nPaperBin );
- pPrinter->SetPaper ( pOldJobSetup->ePaper );
-
- if ( PAPER_USER == pOldJobSetup->ePaper )
- {
- pPrinter->SetMapMode( pOldJobSetup->aUserMapMode );
- pPrinter->SetPaperSizeUser( pOldJobSetup->aUserSize );
- }
-
- delete pOldJobSetup;
- pOldJobSetup = NULL;
- }
-
- if ( bHasOptions )
- {
- // remove PrintOptions from printer ItemSet,
- // so next time the options from the configuration are used
-
- SfxItemSet aSet( pPrinter->GetOptions() );
- aSet.ClearItem( SID_SCPRINTOPTIONS );
- pPrinter->SetOptions( aSet );
- }
-
- PostPaintGridAll(); //! nur wenn geaendert
-}
-
void ScDocShell::GetState( SfxItemSet &rSet )
{
SfxWhichIter aIter(rSet);
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 19147cfaf61f..fe94db107be0 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -45,7 +45,6 @@
class ScEditEngineDefaulter;
class FontList;
-class PrintDialog;
class SfxStyleSheetBasePool;
class SfxStyleSheetHint;
struct ChartSelectionInfo;
@@ -303,13 +302,6 @@ public:
void DoRecalc( BOOL bApi );
void DoHardRecalc( BOOL bApi );
- bool CheckPrint( PrintDialog* pPrintDialog, ScMarkData* pMarkData,
- bool bForceSelected, bool bIsAPI );
- void PreparePrint( PrintDialog* pPrintDialog, ScMarkData* pMarkData );
- void Print( SfxProgress& rProgress, PrintDialog* pPrintDialog,
- ScMarkData* pMarkData, Window* pDialogParent,
- BOOL bForceSelected, BOOL bIsAPI );
-
void UpdateOle( const ScViewData* pViewData, BOOL bSnapSize = FALSE );
BOOL IsOle();
diff --git a/sc/source/ui/inc/prevwsh.hxx b/sc/source/ui/inc/prevwsh.hxx
index 7ff97f8d0152..79f4d799223a 100644
--- a/sc/source/ui/inc/prevwsh.hxx
+++ b/sc/source/ui/inc/prevwsh.hxx
@@ -116,11 +116,7 @@ public:
virtual SfxPrinter* GetPrinter( BOOL bCreate = FALSE );
virtual USHORT SetPrinter( SfxPrinter* pNewPrinter, USHORT nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false );
- virtual PrintDialog* CreatePrintDialog( Window* pParent );
virtual SfxTabPage* CreatePrintOptionsPage( Window *pParent, const SfxItemSet &rOptions );
- virtual void PreparePrint( PrintDialog* pPrintDialog = NULL );
- virtual ErrCode DoPrint( SfxPrinter *pPrinter, PrintDialog *pPrintDialog, BOOL bSilent, BOOL bIsAPI );
- virtual USHORT Print( SfxProgress& rProgress, BOOL bIsAPI, PrintDialog* pPrintDialog = NULL );
void AddAccessibilityObject( SfxListener& rObject );
void RemoveAccessibilityObject( SfxListener& rObject );
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 28cc2a823928..c3316092d044 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -369,13 +369,7 @@ public:
virtual USHORT SetPrinter( SfxPrinter* pNewPrinter,
USHORT nDiffFlags = SFX_PRINTER_ALL, bool bIsApi=false );
- virtual PrintDialog* CreatePrintDialog( Window* pParent );
virtual SfxTabPage* CreatePrintOptionsPage( Window *pParent, const SfxItemSet &rOptions );
- virtual void PreparePrint( PrintDialog* pPrintDialog = NULL );
- virtual ErrCode DoPrint( SfxPrinter *pPrinter,
- PrintDialog *pPrintDialog,
- BOOL bSilent, BOOL bIsAPI );
- virtual USHORT Print( SfxProgress& rProgress, BOOL bIsAPI, PrintDialog* pPrintDialog = NULL );
void ConnectObject( SdrOle2Obj* pObj );
BOOL ActivateObject( SdrOle2Obj* pObj, long nVerb );
diff --git a/sc/source/ui/inc/ui_pch.hxx b/sc/source/ui/inc/ui_pch.hxx
index a1dcbf904694..c7ec17209085 100644
--- a/sc/source/ui/inc/ui_pch.hxx
+++ b/sc/source/ui/inc/ui_pch.hxx
@@ -81,7 +81,7 @@
#include <vcl/outdev.hxx>
#include <vcl/pointr.hxx>
#include <vcl/ptrstyle.hxx>
-#include <vcl/wintypes.hxx>
+#include <tools/wintypes.hxx>
#include <vcl/event.hxx>
#include <limits.h>
#include <tools/errinf.hxx>
@@ -185,7 +185,6 @@
#include <sfx2/ipfrm.hxx>
#include <docsh.hxx>
//REMOVE #include <sfx2/interno.hxx>
-#include <vcl/wintypes.hxx>
#include <sfx2/docfac.hxx>
#include <scitems.hxx>
#include <vcl/virdev.hxx>
diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
index 59da2966cc60..60dc1bc7b115 100644
--- a/sc/source/ui/inc/viewfunc.hxx
+++ b/sc/source/ui/inc/viewfunc.hxx
@@ -53,6 +53,7 @@ class SfxItemSet;
class SvxBorderLine;
class SvxBoxItem;
class SvxBoxInfoItem;
+class SfxStyleSheetBase;
class SfxStyleSheet;
class SfxPoolItem;
class EditTextObject;
@@ -187,8 +188,8 @@ public:
const SfxStyleSheet* GetStyleSheetFromMarked();
void SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet,
BOOL bRecord = TRUE );
- void RemoveStyleSheetInUse( SfxStyleSheet* pStyleSheet );
- void UpdateStyleSheetInUse( SfxStyleSheet* pStyleSheet );
+ void RemoveStyleSheetInUse( const SfxStyleSheetBase* pStyleSheet );
+ void UpdateStyleSheetInUse( const SfxStyleSheetBase* pStyleSheet );
void SetNumberFormat( short nFormatType, ULONG nAdd = 0 );
void SetNumFmtByStr( const String& rCode );
diff --git a/sc/source/ui/src/scstring.src b/sc/source/ui/src/scstring.src
index 9c47a42239cc..17b7b99b2e04 100644
--- a/sc/source/ui/src/scstring.src
+++ b/sc/source/ui/src/scstring.src
@@ -553,11 +553,6 @@ String STR_REPLCELLSWARN
Text [ en-US ] = "You are pasting data into cells that already contain data.\nDo you really want to overwrite the existing data?";
};
-String STR_PRINT_NOTHING
-{
- Text [ en-US ] = "There is nothing to print. The selected print range or sheet is empty.";
-};
-
String SCSTR_ALLFILTER
{
Text [ en-US ] = "All";
@@ -749,22 +744,13 @@ StringArray SCSTR_PRINT_OPTIONS
{
< "Pages"; >;
< "~Include output of empty pages"; >;
- < "If checked empty pages that have no cell contents or draw objects are not printed."; >;
- < "Sheets"; >;
- < "Print ~only selected sheets"; >;
- < "If checked only contents from selected sheets are printed, even if you specify a wider range in the Format - Print Ranges dialog. Content from sheets that are not selected will not be printed."; >;
< "Print content"; >;
< "~All sheets"; >;
- < "The printout will be created from all sheets in the document."; >;
< "~Selected sheets"; >;
- < "The printout will be created only from the currently selected sheets."; >;
< "Selected cells"; >;
- < "The printout will be created only from the currently selected cells."; >;
< "Thereof print"; >;
< "All ~pages"; >;
- < "Print all pages of the printable content."; >;
< "Pa~ges"; >;
- < "Print only some pages of the printable content."; >;
< "%PRODUCTNAME %s"; >;
};
};
diff --git a/sc/source/ui/unoobj/addruno.cxx b/sc/source/ui/unoobj/addruno.cxx
index 10627222be80..9b3ce8e3d4bc 100644
--- a/sc/source/ui/unoobj/addruno.cxx
+++ b/sc/source/ui/unoobj/addruno.cxx
@@ -69,7 +69,7 @@ void ScAddressConversionObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
}
-sal_Bool ScAddressConversionObj::ParseUIString( const String& rUIString )
+sal_Bool ScAddressConversionObj::ParseUIString( const String& rUIString, ::formula::FormulaGrammar::AddressConvention eConv )
{
if (!pDocShell)
return sal_False;
@@ -78,7 +78,7 @@ sal_Bool ScAddressConversionObj::ParseUIString( const String& rUIString )
sal_Bool bSuccess = sal_False;
if ( bIsRange )
{
- USHORT nResult = aRange.ParseAny( rUIString, pDoc );
+ USHORT nResult = aRange.ParseAny( rUIString, pDoc, eConv );
if ( nResult & SCA_VALID )
{
if ( ( nResult & SCA_TAB_3D ) == 0 )
@@ -92,7 +92,7 @@ sal_Bool ScAddressConversionObj::ParseUIString( const String& rUIString )
}
else
{
- USHORT nResult = aRange.aStart.Parse( rUIString, pDoc );
+ USHORT nResult = aRange.aStart.Parse( rUIString, pDoc, eConv );
if ( nResult & SCA_VALID )
{
if ( ( nResult & SCA_TAB_3D ) == 0 )
@@ -118,6 +118,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScAddressConversionObj::getProp
{MAP_CHAR_LEN(SC_UNONAME_PERSREPR), 0, &getCppuType((rtl::OUString*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_REFSHEET), 0, &getCppuType((sal_Int32*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_UIREPR), 0, &getCppuType((rtl::OUString*)0), 0, 0 },
+ {MAP_CHAR_LEN(SC_UNONAME_XLA1REPR), 0, &getCppuType((rtl::OUString*)0), 0, 0 },
{0,0,0,0,0,0}
};
static uno::Reference<beans::XPropertySetInfo> aRef(new SfxItemPropertySetInfo( aPropertyMap ));
@@ -131,6 +132,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScAddressConversionObj::getProp
{MAP_CHAR_LEN(SC_UNONAME_PERSREPR), 0, &getCppuType((rtl::OUString*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_REFSHEET), 0, &getCppuType((sal_Int32*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_UIREPR), 0, &getCppuType((rtl::OUString*)0), 0, 0 },
+ {MAP_CHAR_LEN(SC_UNONAME_XLA1REPR), 0, &getCppuType((rtl::OUString*)0), 0, 0 },
{0,0,0,0,0,0}
};
static uno::Reference<beans::XPropertySetInfo> aRef(new SfxItemPropertySetInfo( aPropertyMap ));
@@ -190,8 +192,11 @@ void SAL_CALL ScAddressConversionObj::setPropertyValue( const rtl::OUString& aPr
bSuccess = ParseUIString( aUIString );
}
}
- else if ( aNameStr.EqualsAscii( SC_UNONAME_PERSREPR ) )
+ else if ( aNameStr.EqualsAscii( SC_UNONAME_PERSREPR ) || aNameStr.EqualsAscii( SC_UNONAME_XLA1REPR ) )
{
+ ::formula::FormulaGrammar::AddressConvention eConv = aNameStr.EqualsAscii( SC_UNONAME_XLA1REPR ) ?
+ ::formula::FormulaGrammar::CONV_OOO : ::formula::FormulaGrammar::CONV_XL_A1;
+
// parse the file format string
rtl::OUString sRepresentation;
if (aValue >>= sRepresentation)
@@ -212,7 +217,7 @@ void SAL_CALL ScAddressConversionObj::setPropertyValue( const rtl::OUString& aPr
}
// parse the rest like a UI string
- bSuccess = ParseUIString( aUIString );
+ bSuccess = ParseUIString( aUIString, eConv );
}
}
else
@@ -265,17 +270,23 @@ uno::Any SAL_CALL ScAddressConversionObj::getPropertyValue( const rtl::OUString&
aRange.aStart.Format( aFormatStr, nFlags, pDoc );
aRet <<= rtl::OUString( aFormatStr );
}
- else if ( aNameStr.EqualsAscii( SC_UNONAME_PERSREPR ) )
+ else if ( aNameStr.EqualsAscii( SC_UNONAME_PERSREPR ) || aNameStr.EqualsAscii( SC_UNONAME_XLA1REPR ) )
{
+ ::formula::FormulaGrammar::AddressConvention eConv = aNameStr.EqualsAscii( SC_UNONAME_XLA1REPR ) ?
+ ::formula::FormulaGrammar::CONV_OOO : ::formula::FormulaGrammar::CONV_XL_A1;
+
// generate file format string - always include sheet
String aFormatStr;
- aRange.aStart.Format( aFormatStr, SCA_VALID | SCA_TAB_3D, pDoc );
+ aRange.aStart.Format( aFormatStr, SCA_VALID | SCA_TAB_3D, pDoc, eConv );
if ( bIsRange )
{
// manually concatenate range so both parts always have the sheet name
aFormatStr.Append( (sal_Unicode) ':' );
String aSecond;
- aRange.aEnd.Format( aSecond, SCA_VALID | SCA_TAB_3D, pDoc );
+ USHORT nFlags = SCA_VALID;
+ if( eConv != ::formula::FormulaGrammar::CONV_XL_A1 )
+ nFlags |= SCA_TAB_3D;
+ aRange.aEnd.Format( aSecond, nFlags, pDoc, eConv );
aFormatStr.Append( aSecond );
}
aRet <<= rtl::OUString( aFormatStr );
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 828ec8f09297..eb493f3be426 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -225,53 +225,53 @@ ScPrintUIOptions::ScPrintUIOptions()
sal_Bool bSuppress = rPrintOpt.GetSkipEmpty();
ResStringArray aStrings( ScResId( SCSTR_PRINT_OPTIONS ) );
- DBG_ASSERT( aStrings.Count() >= 19, "resource incomplete" );
- if( aStrings.Count() < 19 ) // bad resource ?
+ DBG_ASSERT( aStrings.Count() >= 10, "resource incomplete" );
+ if( aStrings.Count() < 10 ) // bad resource ?
return;
m_aUIProperties.realloc( 8 );
// create Section for spreadsheet (results in an extra tab page in dialog)
SvtModuleOptions aOpt;
- String aAppGroupname( aStrings.GetString( 18 ) );
+ String aAppGroupname( aStrings.GetString( 9 ) );
aAppGroupname.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ),
aOpt.GetModuleName( SvtModuleOptions::E_SCALC ) );
- m_aUIProperties[0].Value = getGroupControlOpt( aAppGroupname, rtl::OUString() );
+ m_aUIProperties[0].Value = getGroupControlOpt( aAppGroupname, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:TabPage:AppPage" ) ) );
// create subgroup for pages
m_aUIProperties[1].Value = getSubgroupControlOpt( rtl::OUString( aStrings.GetString( 0 ) ), rtl::OUString() );
// create a bool option for empty pages
m_aUIProperties[2].Value = getBoolControlOpt( rtl::OUString( aStrings.GetString( 1 ) ),
- rtl::OUString( aStrings.GetString( 2 ) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:IsIncludeEmptyPages:CheckBox" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsIncludeEmptyPages" ) ),
! bSuppress
);
// create Subgroup for print content
vcl::PrinterOptionsHelper::UIControlOptions aPrintRangeOpt;
aPrintRangeOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintRange" ) );
- m_aUIProperties[3].Value = getSubgroupControlOpt( rtl::OUString( aStrings.GetString( 6 ) ),
+ m_aUIProperties[3].Value = getSubgroupControlOpt( rtl::OUString( aStrings.GetString( 2 ) ),
rtl::OUString(),
aPrintRangeOpt
);
// create a choice for the content to create
- uno::Sequence< rtl::OUString > aChoices( 3 ), aHelpTexts( 3 );
- aChoices[0] = aStrings.GetString( 7 );
- aHelpTexts[0] = aStrings.GetString( 8 );
- aChoices[1] = aStrings.GetString( 9 );
- aHelpTexts[1] = aStrings.GetString( 10 );
- aChoices[2] = aStrings.GetString( 11 );
- aHelpTexts[2] = aStrings.GetString( 12 );
+ uno::Sequence< rtl::OUString > aChoices( 3 ), aHelpIds( 3 );
+ aChoices[0] = aStrings.GetString( 3 );
+ aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0" ) );
+ aChoices[1] = aStrings.GetString( 4 );
+ aHelpIds[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1" ) );
+ aChoices[2] = aStrings.GetString( 5 );
+ aHelpIds[2] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:2" ) );
m_aUIProperties[4].Value = getChoiceControlOpt( rtl::OUString(),
- aHelpTexts,
+ aHelpIds,
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) ),
aChoices,
nContent );
// create Subgroup for print range
aPrintRangeOpt.mbInternalOnly = sal_True;
- m_aUIProperties[5].Value = getSubgroupControlOpt( rtl::OUString( aStrings.GetString( 13 ) ),
+ m_aUIProperties[5].Value = getSubgroupControlOpt( rtl::OUString( aStrings.GetString( 6 ) ),
rtl::OUString(),
aPrintRangeOpt
);
@@ -279,13 +279,13 @@ ScPrintUIOptions::ScPrintUIOptions()
// create a choice for the range to print
rtl::OUString aPrintRangeName( RTL_CONSTASCII_USTRINGPARAM( "PrintRange" ) );
aChoices.realloc( 2 );
- aHelpTexts.realloc( 2 );
- aChoices[0] = aStrings.GetString( 14 );
- aHelpTexts[0] = aStrings.GetString( 15 );
- aChoices[1] = aStrings.GetString( 16 );
- aHelpTexts[1] = aStrings.GetString( 17 );
+ aHelpIds.realloc( 2 );
+ aChoices[0] = aStrings.GetString( 7 );
+ aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintRange:RadioButton:0" ) );
+ aChoices[1] = aStrings.GetString( 8 );
+ aHelpIds[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintRange:RadioButton:1" ) );
m_aUIProperties[6].Value = getChoiceControlOpt( rtl::OUString(),
- aHelpTexts,
+ aHelpIds,
aPrintRangeName,
aChoices,
0 );
@@ -293,24 +293,11 @@ ScPrintUIOptions::ScPrintUIOptions()
// create a an Edit dependent on "Pages" selected
vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintRangeName, 1, sal_True );
m_aUIProperties[7].Value = getEditControlOpt( rtl::OUString(),
- rtl::OUString(),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PageRange:Edit" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ),
rtl::OUString(),
aPageRangeOpt
);
-
- // "Print only selected sheets" isn't needed because of the "Selected Sheets" choice in "Print content"
-#if 0
- // create subgroup for sheets
- m_aUIProperties[8].Value = getSubgroupControlOpt( rtl::OUString( aStrings.GetString( 3 ) ), rtl::OUString() );
-
- // create a bool option for selected pages only
- m_aUIProperties[9].Value = getBoolControlOpt( rtl::OUString( aStrings.GetString( 4 ) ),
- rtl::OUString( aStrings.GetString( 5 ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsOnlySelectedSheets" ) ),
- i_bSelectedOnly
- );
-#endif
}
void ScPrintUIOptions::SetDefaults()
@@ -449,6 +436,12 @@ ScSheetSaveData* ScModelObj::GetSheetSaveData()
return NULL;
}
+void ScModelObj::RepaintRange( const ScRange& rRange )
+{
+ if (pDocShell)
+ pDocShell->PostPaint( rRange, PAINT_GRID );
+}
+
uno::Any SAL_CALL ScModelObj::queryInterface( const uno::Type& rType )
throw(uno::RuntimeException)
{
diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx
index 392533c7cf93..6da02cf9e4e3 100644
--- a/sc/source/ui/unoobj/fmtuno.cxx
+++ b/sc/source/ui/unoobj/fmtuno.cxx
@@ -236,16 +236,11 @@ ScTableConditionalFormat::~ScTableConditionalFormat()
void ScTableConditionalFormat::AddEntry_Impl(const ScCondFormatEntryItem& aEntry)
{
- ScTableConditionalEntry* pNew = new ScTableConditionalEntry(this, aEntry);
+ ScTableConditionalEntry* pNew = new ScTableConditionalEntry(aEntry);
pNew->acquire();
aEntries.Insert( pNew, LIST_APPEND );
}
-void ScTableConditionalFormat::DataChanged()
-{
- // wenn's mal das "lebende Objekt" ist, muss hier was passieren...
-}
-
// XSheetConditionalFormat
ScTableConditionalEntry* ScTableConditionalFormat::GetObjectByIndex_Impl(USHORT nIndex) const
@@ -348,7 +343,6 @@ void SAL_CALL ScTableConditionalFormat::addNew(
}
AddEntry_Impl(aEntry);
- DataChanged();
}
void SAL_CALL ScTableConditionalFormat::removeByIndex( sal_Int32 nIndex )
@@ -360,7 +354,6 @@ void SAL_CALL ScTableConditionalFormat::removeByIndex( sal_Int32 nIndex )
{
aEntries.Remove(pEntry);
pEntry->release();
- DataChanged();
}
}
@@ -371,8 +364,6 @@ void SAL_CALL ScTableConditionalFormat::clear() throw(uno::RuntimeException)
aEntries.First();
while ( ( pEntry = (ScTableConditionalEntry*)aEntries.Remove() ) != NULL )
pEntry->release();
-
- DataChanged();
}
// XEnumerationAccess
@@ -525,19 +516,14 @@ ScTableConditionalFormat* ScTableConditionalFormat::getImplementation(
//UNUSED2008-05 {
//UNUSED2008-05 }
-ScTableConditionalEntry::ScTableConditionalEntry(ScTableConditionalFormat* pPar,
- const ScCondFormatEntryItem& aItem) :
- pParent( pPar ),
+ScTableConditionalEntry::ScTableConditionalEntry(const ScCondFormatEntryItem& aItem) :
aData( aItem )
{
- if (pParent)
- pParent->acquire();
+ // #i113668# only store the settings, keep no reference to parent object
}
ScTableConditionalEntry::~ScTableConditionalEntry()
{
- if (pParent)
- pParent->release();
}
void ScTableConditionalEntry::GetData(ScCondFormatEntryItem& rData) const
@@ -559,8 +545,6 @@ void SAL_CALL ScTableConditionalEntry::setOperator( sheet::ConditionOperator nOp
{
ScUnoGuard aGuard;
aData.meMode = lcl_ConditionOperatorToMode( nOperator );
- if (pParent)
- pParent->DataChanged();
}
rtl::OUString SAL_CALL ScTableConditionalEntry::getFormula1() throw(uno::RuntimeException)
@@ -574,8 +558,6 @@ void SAL_CALL ScTableConditionalEntry::setFormula1( const rtl::OUString& aFormul
{
ScUnoGuard aGuard;
aData.maExpr1 = String( aFormula1 );
- if (pParent)
- pParent->DataChanged();
}
rtl::OUString SAL_CALL ScTableConditionalEntry::getFormula2() throw(uno::RuntimeException)
@@ -589,8 +571,6 @@ void SAL_CALL ScTableConditionalEntry::setFormula2( const rtl::OUString& aFormul
{
ScUnoGuard aGuard;
aData.maExpr2 = String( aFormula2 );
- if (pParent)
- pParent->DataChanged();
}
table::CellAddress SAL_CALL ScTableConditionalEntry::getSourcePosition() throw(uno::RuntimeException)
@@ -608,8 +588,6 @@ void SAL_CALL ScTableConditionalEntry::setSourcePosition( const table::CellAddre
{
ScUnoGuard aGuard;
aData.maPos.Set( (SCCOL)aSourcePosition.Column, (SCROW)aSourcePosition.Row, aSourcePosition.Sheet );
- if (pParent)
- pParent->DataChanged();
}
// XSheetConditionalEntry
@@ -625,8 +603,6 @@ void SAL_CALL ScTableConditionalEntry::setStyleName( const rtl::OUString& aStyle
{
ScUnoGuard aGuard;
aData.maStyle = ScStyleNameConversion::ProgrammaticToDisplayName( aStyleName, SFX_STYLE_FAMILY_PARA );
- if (pParent)
- pParent->DataChanged();
}
//------------------------------------------------------------------------
@@ -739,11 +715,6 @@ ScTableValidationObj::~ScTableValidationObj()
{
}
-void ScTableValidationObj::DataChanged()
-{
- // wenn's mal das "lebende Objekt" ist, muss hier was passieren...
-}
-
// XSheetCondition
sheet::ConditionOperator SAL_CALL ScTableValidationObj::getOperator()
@@ -758,7 +729,6 @@ void SAL_CALL ScTableValidationObj::setOperator( sheet::ConditionOperator nOpera
{
ScUnoGuard aGuard;
nMode = sal::static_int_cast<USHORT>( lcl_ConditionOperatorToMode( nOperator ) );
- DataChanged();
}
rtl::OUString SAL_CALL ScTableValidationObj::getFormula1() throw(uno::RuntimeException)
@@ -772,7 +742,6 @@ void SAL_CALL ScTableValidationObj::setFormula1( const rtl::OUString& aFormula1
{
ScUnoGuard aGuard;
aExpr1 = String( aFormula1 );
- DataChanged();
}
rtl::OUString SAL_CALL ScTableValidationObj::getFormula2() throw(uno::RuntimeException)
@@ -786,7 +755,6 @@ void SAL_CALL ScTableValidationObj::setFormula2( const rtl::OUString& aFormula2
{
ScUnoGuard aGuard;
aExpr2 = String( aFormula2 );
- DataChanged();
}
table::CellAddress SAL_CALL ScTableValidationObj::getSourcePosition() throw(uno::RuntimeException)
@@ -804,7 +772,6 @@ void SAL_CALL ScTableValidationObj::setSourcePosition( const table::CellAddress&
{
ScUnoGuard aGuard;
aSrcPos.Set( (SCCOL)aSourcePosition.Column, (SCROW)aSourcePosition.Row, aSourcePosition.Sheet );
- DataChanged();
}
uno::Sequence<sheet::FormulaToken> SAL_CALL ScTableValidationObj::getTokens( sal_Int32 nIndex )
@@ -963,8 +930,6 @@ void SAL_CALL ScTableValidationObj::setPropertyValue(
if ( aValue >>= nVal )
meGrammar2 = static_cast< FormulaGrammar::Grammar >(nVal);
}
-
- DataChanged();
}
uno::Any SAL_CALL ScTableValidationObj::getPropertyValue( const rtl::OUString& aPropertyName )
diff --git a/sc/source/ui/vba/vbasheetobject.cxx b/sc/source/ui/vba/vbasheetobject.cxx
index 28e54de859ad..7c8d80d9fcfa 100644
--- a/sc/source/ui/vba/vbasheetobject.cxx
+++ b/sc/source/ui/vba/vbasheetobject.cxx
@@ -377,14 +377,14 @@ void SAL_CALL ScVbaControlObjectBase::setOnAction( const OUString& rMacroName )
// if a macro name has been passed, try to attach it to the event
if( rMacroName.getLength() > 0 )
{
- VBAMacroResolvedInfo aResolvedMacro = resolveVBAMacro( getSfxObjShell( mxModel ), rMacroName );
- if( !aResolvedMacro.IsResolved() )
+ MacroResolvedInfo aResolvedMacro = resolveVBAMacro( getSfxObjShell( mxModel ), rMacroName );
+ if( !aResolvedMacro.mbFound )
throw uno::RuntimeException();
script::ScriptEventDescriptor aDescriptor;
aDescriptor.ListenerType = maListenerType;
aDescriptor.EventMethod = maEventMethod;
aDescriptor.ScriptType = CREATE_OUSTRING( "Script" );
- aDescriptor.ScriptCode = makeMacroURL( aResolvedMacro.ResolvedMacro() );
+ aDescriptor.ScriptCode = makeMacroURL( aResolvedMacro.msResolvedMacro );
xEventMgr->registerScriptEvent( nIndex, aDescriptor );
}
}
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index 489da0cc4899..3307398b5ef8 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -530,19 +530,15 @@ void ScDrawView::MarkListHasChanged()
SfxViewFrame* pViewFrame = pViewSh->GetViewFrame();
BOOL bOle = pViewSh->GetViewFrame()->GetFrame().IsInPlace();
+ uno::Sequence< embed::VerbDescriptor > aVerbs;
if ( pOle2Obj && !bOle )
{
uno::Reference < embed::XEmbeddedObject > xObj = pOle2Obj->GetObjRef();
+ DBG_ASSERT( xObj.is(), "SdrOle2Obj ohne ObjRef" );
if (xObj.is())
- pViewSh->SetVerbs( xObj->getSupportedVerbs() );
- else
- {
- DBG_ERROR("SdrOle2Obj ohne ObjRef");
- pViewSh->SetVerbs( 0 );
- }
+ aVerbs = xObj->getSupportedVerbs();
}
- else
- pViewSh->SetVerbs( 0 );
+ pViewSh->SetVerbs( aVerbs );
// Image-Map Editor
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 12a1bb87211b..3ff7222178f3 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -453,7 +453,7 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq )
{
if ( pStyleSheet )
{
- pTabViewShell->RemoveStyleSheetInUse( (SfxStyleSheet*)pStyleSheet );
+ pTabViewShell->RemoveStyleSheetInUse( pStyleSheet );
pStylePool->Remove( pStyleSheet );
pTabViewShell->InvalidateAttribs();
nRetMask = TRUE;
@@ -556,7 +556,7 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq )
// Attribute uebernehmen und Style anwenden
pStyleSheet->GetItemSet().Put( aAttrSet );
- pTabViewShell->UpdateStyleSheetInUse( (SfxStyleSheet*)pStyleSheet );
+ pTabViewShell->UpdateStyleSheetInUse( pStyleSheet );
// call SetStyleSheetToMarked after adding the ScUndoModifyStyle
// (pStyleSheet pointer is used!)
@@ -578,7 +578,7 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq )
}
pStyleSheet->GetItemSet().Put( aAttrSet );
- pTabViewShell->UpdateStyleSheetInUse( (SfxStyleSheet*)pStyleSheet );
+ pTabViewShell->UpdateStyleSheetInUse( pStyleSheet );
// call SetStyleSheetToMarked after adding the ScUndoModifyStyle
// (pStyleSheet pointer is used!)
@@ -868,7 +868,7 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq )
(const SvxNumberInfoItem&)
*(pDocSh->GetItem(SID_ATTR_NUMBERFORMAT_INFO)) );
- pTabViewShell->UpdateStyleSheetInUse( (SfxStyleSheet*)pStyleSheet );
+ pTabViewShell->UpdateStyleSheetInUse( pStyleSheet );
pTabViewShell->InvalidateAttribs();
}
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 6e28d6ba846d..52d3217d7881 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -44,7 +44,6 @@
#include <sfx2/dispatch.hxx>
#include <sfx2/objface.hxx>
#include <sfx2/request.hxx>
-#include <svtools/printdlg.hxx>
#include <svl/stritem.hxx>
#include <svl/whiter.hxx>
#include <vcl/msgbox.hxx>
@@ -484,40 +483,6 @@ USHORT __EXPORT ScPreviewShell::SetPrinter( SfxPrinter *pNewPrinter, USHORT nDif
return pDocShell->SetPrinter( pNewPrinter, nDiffFlags );
}
-PrintDialog* __EXPORT ScPreviewShell::CreatePrintDialog( Window* pParent )
-{
- pDocShell->GetDocument()->SetPrintOptions(); // Optionen aus OFA am Printer setzen
- (void)GetPrinter();
-
- const long nCurPage = pPreview->GetPageNo()+1;
- const long nDocPageMax = pPreview->GetTotalPages();
- PrintDialog* pDlg = new PrintDialog( pParent, true );
-// wenn zu langsam wieder einbauen
-// if ( pPreview->AllTested() )
-// nPageMax = pPreview->GetTotalPages();
-
- pDlg->EnableSheetRange( true, PRINTSHEETS_ALL );
- pDlg->EnableSheetRange( true, PRINTSHEETS_SELECTED_SHEETS );
- pDlg->EnableSheetRange( false, PRINTSHEETS_SELECTED_CELLS );
- bool bAllTabs = SC_MOD()->GetPrintOptions().GetAllSheets();
- pDlg->CheckSheetRange( bAllTabs ? PRINTSHEETS_ALL : PRINTSHEETS_SELECTED_SHEETS );
-
- if ( nDocPageMax > 0 )
- pDlg->SetRangeText( String::CreateFromInt32( nCurPage ) );
-
- pDlg->EnableRange ( PRINTDIALOG_ALL );
- pDlg->EnableRange ( PRINTDIALOG_RANGE );
- pDlg->SetFirstPage ( 1 );
- pDlg->SetMinPage ( 1 );
- pDlg->SetLastPage ( (USHORT)nDocPageMax );
- pDlg->SetMaxPage ( (USHORT)nDocPageMax );
- pDlg->EnableCollate ();
-
- // Selektion hier nicht
-
- return pDlg;
-}
-
SfxTabPage* ScPreviewShell::CreatePrintOptionsPage( Window *pParent, const SfxItemSet &rOptions )
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
@@ -529,66 +494,6 @@ SfxTabPage* ScPreviewShell::CreatePrintOptionsPage( Window *pParent, const SfxIt
return 0;
}
-void __EXPORT ScPreviewShell::PreparePrint( PrintDialog* pPrintDialog )
-{
- SfxViewShell::PreparePrint( pPrintDialog );
-
- ScMarkData aMarkData;
- aMarkData.SelectTable( static_cast< SCTAB >( pPreview->GetTab() ), TRUE );
- pDocShell->PreparePrint( pPrintDialog, &aMarkData );
-}
-
-ErrCode ScPreviewShell::DoPrint( SfxPrinter *pPrinter,
- PrintDialog *pPrintDialog, BOOL bSilent, BOOL bIsAPI )
-{
- ErrCode nRet = ERRCODE_IO_ABORT;
-
- ScMarkData aMarkData;
- aMarkData.SelectTable( static_cast< SCTAB >( pPreview->GetTab() ), TRUE );
-
- if ( pDocShell->CheckPrint( pPrintDialog, &aMarkData, false, bIsAPI ) )
- {
- // SfxViewShell::DoPrint calls Print (after StartJob etc.)
- nRet = SfxViewShell::DoPrint( pPrinter, pPrintDialog, bSilent, bIsAPI );
- }
-
- return nRet;
-}
-
-USHORT __EXPORT ScPreviewShell::Print( SfxProgress& rProgress, BOOL bIsAPI, PrintDialog* pPrintDialog )
-{
- pDocShell->GetDocument()->SetPrintOptions(); // Optionen aus OFA am Printer setzen
-
- // get the list of affected sheets before SfxViewShell::Print
- bool bAllTabs = ( pPrintDialog ? ( pPrintDialog->GetCheckedSheetRange() == PRINTSHEETS_ALL ) : SC_MOD()->GetPrintOptions().GetAllSheets() );
-
- ScMarkData aMarkData;
- aMarkData.SelectTable( static_cast< SCTAB >( pPreview->GetTab() ), TRUE );
-
- uno::Sequence< sal_Int32 > aSheets;
- SCTAB nTabCount = pDocShell->GetDocument()->GetTableCount();
- sal_Int32 nPrinted = 0;
- for ( SCTAB nTab = 0; nTab < nTabCount; ++nTab )
- {
- if ( bAllTabs || aMarkData.GetTableSelect( nTab ) )
- {
- aSheets.realloc( nPrinted + 1 );
- aSheets[nPrinted] = nTab;
- ++nPrinted;
- }
- }
-
- uno::Sequence < beans::PropertyValue > aProps(1);
- aProps[0].Name = ::rtl::OUString::createFromAscii( "PrintSheets" );
- aProps[0].Value <<= aSheets;
- SetAdditionalPrintOptions( aProps );
-
- SfxViewShell::Print( rProgress, bIsAPI, pPrintDialog );
- pDocShell->Print( rProgress, pPrintDialog, &aMarkData, pPreview, FALSE, bIsAPI );
-
- return 0;
-}
-
//------------------------------------------------------------------------
void __EXPORT ScPreviewShell::Activate(BOOL bMDI)
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index 378ea1233cf9..378ea1233cf9 100755..100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 93d1edd7fee5..886a3035a847 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -767,11 +767,13 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
if ( nCurX < nDeltaX || nCurX >= nDeltaX+nSizeX )
{
nNewDeltaX = nDeltaX + nCurX - aViewData.GetCurX();
+ if (nNewDeltaX < 0) nNewDeltaX = 0;
nSizeX = (SCsCOL) aViewData.CellsAtX( nNewDeltaX, 1, eAlignX );
}
if ( nCurY < nDeltaY || nCurY >= nDeltaY+nSizeY )
{
nNewDeltaY = nDeltaY + nCurY - aViewData.GetCurY();
+ if (nNewDeltaY < 0) nNewDeltaY = 0;
nSizeY = (SCsROW) aViewData.CellsAtY( nNewDeltaY, 1, eAlignY );
}
@@ -780,7 +782,7 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
if ( nCurX < nNewDeltaX || nCurX >= nNewDeltaX+nSizeX )
{
nNewDeltaX = nCurX - (nSizeX / 2);
- if (nNewDeltaX < 0) nNewDeltaY = 0;
+ if (nNewDeltaX < 0) nNewDeltaX = 0;
nSizeX = (SCsCOL) aViewData.CellsAtX( nNewDeltaX, 1, eAlignX );
}
if ( nCurY < nNewDeltaY || nCurY >= nNewDeltaY+nSizeY )
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 0835d08de9fd..4596880b7fb6 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -46,7 +46,6 @@
#include <sfx2/request.hxx>
#include <sfx2/printer.hxx>
#include <sfx2/dispatch.hxx>
-#include <svtools/printdlg.hxx>
#include <svl/whiter.hxx>
#include <unotools/moduleoptions.hxx>
#include <rtl/logfile.hxx>
@@ -1159,57 +1158,6 @@ USHORT __EXPORT ScTabViewShell::SetPrinter( SfxPrinter *pNewPrinter, USHORT nDif
return GetViewData()->GetDocShell()->SetPrinter( pNewPrinter, nDiffFlags );
}
-PrintDialog* __EXPORT ScTabViewShell::CreatePrintDialog( Window *pParent )
-{
- ScDocShell* pDocShell = GetViewData()->GetDocShell();
- ScDocument* pDoc = pDocShell->GetDocument();
-
- pDoc->SetPrintOptions(); // Optionen aus OFA am Printer setzen
- SfxPrinter* pPrinter = GetPrinter();
-
- String aStrRange;
- PrintDialog* pDlg = new PrintDialog( pParent, true );
- SCTAB nTabCount = pDoc->GetTableCount();
- long nDocPageMax = 0;
-
- pDlg->EnableSheetRange( true, PRINTSHEETS_ALL );
- pDlg->EnableSheetRange( true, PRINTSHEETS_SELECTED_SHEETS );
- pDlg->EnableSheetRange( true, PRINTSHEETS_SELECTED_CELLS );
- bool bAllTabs = SC_MOD()->GetPrintOptions().GetAllSheets();
- pDlg->CheckSheetRange( bAllTabs ? PRINTSHEETS_ALL : PRINTSHEETS_SELECTED_SHEETS );
-
- // update all pending row heights with a single progress bar,
- // instead of a separate progress for each sheet from ScPrintFunc
- pDocShell->UpdatePendingRowHeights( MAXTAB, true );
-
- for ( SCTAB i=0; i<nTabCount; i++ )
- {
- ScPrintFunc aPrintFunc( pDocShell, pPrinter, i );
- nDocPageMax += aPrintFunc.GetTotalPages();
- }
-
- if ( nDocPageMax > 0 )
- {
- aStrRange = '1';
- if ( nDocPageMax > 1 )
- {
- aStrRange += '-';
- aStrRange += String::CreateFromInt32( nDocPageMax );
- }
- }
-
- pDlg->SetRangeText ( aStrRange );
- pDlg->EnableRange ( PRINTDIALOG_ALL );
- pDlg->EnableRange ( PRINTDIALOG_RANGE );
- pDlg->SetFirstPage ( 1 );
- pDlg->SetMinPage ( 1 );
- pDlg->SetLastPage ( (USHORT)nDocPageMax );
- pDlg->SetMaxPage ( (USHORT)nDocPageMax );
- pDlg->EnableCollate ();
-
- return pDlg;
-}
-
SfxTabPage* ScTabViewShell::CreatePrintOptionsPage( Window *pParent, const SfxItemSet &rOptions )
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
@@ -1221,78 +1169,6 @@ SfxTabPage* ScTabViewShell::CreatePrintOptionsPage( Window *pParent, const SfxIt
return 0;
}
-void __EXPORT ScTabViewShell::PreparePrint( PrintDialog* pPrintDialog )
-{
- ScDocShell* pDocShell = GetViewData()->GetDocShell();
-
- SfxViewShell::PreparePrint( pPrintDialog );
- pDocShell->PreparePrint( pPrintDialog, &GetViewData()->GetMarkData() );
-}
-
-ErrCode ScTabViewShell::DoPrint( SfxPrinter *pPrinter,
- PrintDialog *pPrintDialog, BOOL bSilent, BOOL bIsAPI )
-{
- // #72527# if SID_PRINTDOCDIRECT is executed and there's a selection,
- // ask if only the selection should be printed
-
- const ScMarkData& rMarkData = GetViewData()->GetMarkData();
- if ( !pPrintDialog && !bSilent && !bIsAPI && ( rMarkData.IsMarked() || rMarkData.IsMultiMarked() ) )
- {
- SvxPrtQryBox aQuery( GetDialogParent() );
- short nBtn = aQuery.Execute();
-
- if ( nBtn == RET_CANCEL )
- return ERRCODE_IO_ABORT;
-
- if ( nBtn == RET_OK )
- bPrintSelected = TRUE;
- }
-
- ErrCode nRet = ERRCODE_IO_ABORT;
-
- ScDocShell* pDocShell = GetViewData()->GetDocShell();
- if ( pDocShell->CheckPrint( pPrintDialog, &GetViewData()->GetMarkData(), bPrintSelected, bIsAPI ) )
- {
- // get the list of affected sheets before SfxViewShell::Print
- bool bAllTabs = ( pPrintDialog ? ( pPrintDialog->GetCheckedSheetRange() == PRINTSHEETS_ALL ) : SC_MOD()->GetPrintOptions().GetAllSheets() );
-
- uno::Sequence<sal_Int32> aSheets;
- SCTAB nTabCount = pDocShell->GetDocument()->GetTableCount();
- USHORT nPrinted = 0;
- for ( SCTAB nTab=0; nTab<nTabCount; nTab++ )
- if ( bAllTabs || rMarkData.GetTableSelect(nTab) )
- {
- aSheets.realloc( nPrinted + 1 );
- aSheets[nPrinted] = nTab;
- ++nPrinted;
- }
-
- uno::Sequence < beans::PropertyValue > aProps(1);
- aProps[0].Name=::rtl::OUString::createFromAscii("PrintSheets");
- aProps[0].Value <<= aSheets;
- SetAdditionalPrintOptions( aProps );
-
- // SfxViewShell::DoPrint calls Print (after StartJob etc.)
- nRet = SfxViewShell::DoPrint( pPrinter, pPrintDialog, bSilent, bIsAPI );
- }
-
- bPrintSelected = FALSE;
-
- return nRet;
-}
-
-USHORT __EXPORT ScTabViewShell::Print( SfxProgress& rProgress, BOOL bIsAPI,
- PrintDialog* pPrintDialog )
-{
- ScDocShell* pDocShell = GetViewData()->GetDocShell();
- pDocShell->GetDocument()->SetPrintOptions(); // Optionen aus OFA am Printer setzen
-
- SfxViewShell::Print( rProgress, bIsAPI, pPrintDialog );
- pDocShell->Print( rProgress, pPrintDialog, &GetViewData()->GetMarkData(),
- GetDialogParent(), bPrintSelected, bIsAPI );
- return 0;
-}
-
void ScTabViewShell::StopEditShell()
{
if ( pEditShell != NULL && !bDontSwitch )
diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx
index 123464cd5fda..ded411aca9ed 100644
--- a/sc/source/ui/view/viewfun4.cxx
+++ b/sc/source/ui/view/viewfun4.cxx
@@ -392,9 +392,11 @@ void ScViewFunc::DoThesaurus( BOOL bRecord )
if (pCell)
{
((ScEditCell*) pCell)->GetData(pTObject);
- pOldTObj = pTObject->Clone();
if (pTObject)
+ {
+ pOldTObj = pTObject->Clone();
pThesaurusEngine->SetText(*pTObject);
+ }
}
}
else
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 231eb4e67562..e0ebb8f3024f 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -1545,7 +1545,7 @@ void ScViewFunc::SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet, BOOL bRecord
}
-void ScViewFunc::RemoveStyleSheetInUse( SfxStyleSheet* pStyleSheet )
+void ScViewFunc::RemoveStyleSheetInUse( const SfxStyleSheetBase* pStyleSheet )
{
if ( !pStyleSheet) return;
// -------------------------------------------------------------------
@@ -1572,7 +1572,7 @@ void ScViewFunc::RemoveStyleSheetInUse( SfxStyleSheet* pStyleSheet )
pHdl->ForgetLastPattern();
}
-void ScViewFunc::UpdateStyleSheetInUse( SfxStyleSheet* pStyleSheet )
+void ScViewFunc::UpdateStyleSheetInUse( const SfxStyleSheetBase* pStyleSheet )
{
if ( !pStyleSheet) return;
// -------------------------------------------------------------------