[Libreoffice-commits] .: Branch 'integration/dev300_m98' - sc/inc sc/source
Michael Meeks
mmeeks at kemper.freedesktop.org
Tue Mar 8 07:49:49 PST 2011
sc/inc/helpids.h | 6
sc/inc/sc.hrc | 2
sc/source/filter/excel/excdoc.cxx | 2
sc/source/filter/excel/excimp8.cxx | 15 -
sc/source/filter/excel/xeescher.cxx | 2
sc/source/filter/excel/xestream.cxx | 73 +----
sc/source/filter/excel/xestyle.cxx | 2
sc/source/filter/excel/xiescher.cxx | 2
sc/source/filter/inc/ftools.hxx | 76 +++++
sc/source/filter/inc/xestream.hxx | 2
sc/source/filter/inc/xiescher.hxx | 74 -----
sc/source/filter/xcl97/XclExpChangeTrack.cxx | 3
sc/source/filter/xcl97/xcl97rec.cxx | 2
sc/source/filter/xml/sheetdata.cxx | 10
sc/source/ui/attrdlg/scdlgfact.cxx | 4
sc/source/ui/docshell/docfunc.cxx | 2
sc/source/ui/docshell/docsh4.cxx | 350 ---------------------------
sc/source/ui/docshell/makefile.mk | 1
sc/source/ui/drawfunc/objdraw.src | 4
sc/source/ui/inc/tabview.hxx | 3
sc/source/ui/inc/undotab.hxx | 4
sc/source/ui/inc/viewfunc.hxx | 2
sc/source/ui/src/popup.src | 2
sc/source/ui/undo/undotab.cxx | 13 -
sc/source/ui/unoobj/dapiuno.cxx | 4
sc/source/ui/unoobj/docuno.cxx | 45 ---
sc/source/ui/unoobj/fmtuno.cxx | 4
sc/source/ui/unoobj/servuno.cxx | 1
sc/source/ui/unoobj/viewuno.cxx | 2
sc/source/ui/vba/excelvbahelper.cxx | 9
sc/source/ui/vba/excelvbahelper.hxx | 1
sc/source/ui/vba/vbaeventshelper.cxx | 4
sc/source/ui/vba/vbaeventshelper.hxx | 2
sc/source/ui/vba/vbarange.cxx | 64 +---
sc/source/ui/vba/vbasheetobject.cxx | 2
sc/source/ui/view/prevwsh.cxx | 95 -------
sc/source/ui/view/tabvwsh4.cxx | 129 ---------
sc/source/ui/view/tabvwshe.cxx | 4
sc/source/ui/view/tabvwshf.cxx | 8
sc/source/ui/view/viewdata.cxx | 39 ---
sc/source/ui/view/viewfun2.cxx | 3
41 files changed, 173 insertions(+), 899 deletions(-)
New commits:
commit 0fa5013e1db5af1b8ef8d84c7bc59121adf3f3dc
Author: Michael Meeks <michael.meeks at novell.com>
Date: Tue Mar 8 15:48:30 2011 +0000
sc compile completes
diff --git a/sc/inc/helpids.h b/sc/inc/helpids.h
index b4dd01a..e4ef06f 100644
--- a/sc/inc/helpids.h
+++ b/sc/inc/helpids.h
@@ -222,6 +222,9 @@
#define HID_SCMENU_SENDTO "SC_HID_SCMENU_SENDTO"
#define HID_SCMENU_CHANGES "SC_HID_SCMENU_CHANGES"
+#define HID_SCMENU_EDITLNK "HID_SCMENU_EDITLNK"
+#define HID_SCMENU_DELLNK "HID_SCMENU_DELLNK"
+
#define HID_SC_FAP_BTN_FX1 "SC_HID_SC_FAP_BTN_FX1"
#define HID_SC_FAP_BTN_FX2 "SC_HID_SC_FAP_BTN_FX2"
#define HID_SC_FAP_BTN_FX3 "SC_HID_SC_FAP_BTN_FX3"
@@ -240,6 +243,8 @@
#define HID_SC_CHANGES_COMMENT "SC_HID_SC_CHANGES_COMMENT"
#define HID_SC_FUNCTIONLIST "SC_HID_SC_FUNCTIONLIST"
#define HID_SCPAGE_OPTLOAD "SC_HID_SCPAGE_OPTLOAD"
+#define HID_SCPAGE_FORMULA "SC_HID_SCPAGE_FORMULA"
+#define HID_SCPAGE_COMPATIBILITY "SC_HID_SCPAGE_COMPATIBILITY"
#define HID_PASSWD_TABLE "SC_HID_PASSWD_TABLE"
#define HID_PASSWD_DOC "SC_HID_PASSWD_DOC"
@@ -398,7 +403,6 @@
#define HID_MN_FORMAT_ALGN "SC_HID_MN_FORMAT_ALGN"
#define HID_MN_FORMAT_LINESPACE "SC_HID_MN_FORMAT_LINESPACE"
-
// Ende Hilfe IDs ------------------------------------------------------------
#define HID_SC_FUNC_DUMMY "SC_HID_SC_FUNC_DUMMY"
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 367807a..e4f283d 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -1242,7 +1242,6 @@
// Formula options page
#define RID_SCPAGE_FORMULA (SC_OOO_BUILD_START + 2)
-#define HID_SCPAGE_FORMULA (SC_OOO_BUILD_START + 3)
// Insert current date and time to cell via command
#define SID_INSERT_CURRENT_DATE (SC_OOO_BUILD_START + 4)
@@ -1255,6 +1254,5 @@
// Compatibility options page
#define RID_SCPAGE_COMPATIBILITY (SC_OOO_BUILD_START + 9)
-#define HID_SCPAGE_COMPATIBILITY (SC_OOO_BUILD_START + 10)
#endif
diff --git a/sc/source/filter/excel/excdoc.cxx b/sc/source/filter/excel/excdoc.cxx
index 8d90406..e84c488 100644
--- a/sc/source/filter/excel/excdoc.cxx
+++ b/sc/source/filter/excel/excdoc.cxx
@@ -87,7 +87,7 @@
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
-#include <oox/core/tokens.hxx>
+#include <oox/token/tokens.hxx>
#include <boost/shared_ptr.hpp>
using namespace ::oox;
diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx
index 4bee0ec..2daa162 100644
--- a/sc/source/filter/excel/excimp8.cxx
+++ b/sc/source/filter/excel/excimp8.cxx
@@ -112,6 +112,7 @@
#include <comphelper/mediadescriptor.hxx>
#include <cppuhelper/component_context.hxx>
#include <sfx2/app.hxx>
+#include <sfx2/docinf.hxx>
#include "xltoolbar.hxx"
using namespace com::sun::star;
@@ -324,7 +325,8 @@ void ImportExcel8::ReadBasic( void )
{
SfxObjectShell* pShell = GetDocShell();
SotStorageRef xRootStrg = GetRootStorage();
- if( pShell && xRootStrg.Is() ) try
+ SvtFilterOptions* pFilterOpt = SvtFilterOptions::Get();
+ if( pShell && xRootStrg.Is() && pFilterOpt )
{
bool bLoadCode = pFilterOpt->IsLoadExcelBasicCode();
bool bLoadExecutable = pFilterOpt->IsLoadExcelBasicExecutable();
@@ -345,7 +347,7 @@ void ImportExcel8::ReadBasic( void )
CTBWrapper wrapper;
if ( wrapper.Read( xXCB ) )
{
-#if DEBUG
+#if OSL_DEBUG_LEVEL > 1
wrapper.Print( stderr );
#endif
wrapper.ImportCustomToolBar( *pShell );
@@ -394,15 +396,6 @@ void ImportExcel8::ReadBasic( void )
catch( uno::Exception& )
{
}
- aMediaDesc[ MediaDescriptor::PROP_INPUTSTREAM() ] <<= rMedium.GetInputStream();
- aMediaDesc[ MediaDescriptor::PROP_INTERACTIONHANDLER() ] <<= rMedium.GetInteractionHandler();
-
- // call the filter
- uno::Reference< document::XFilter > xFilter( xImporter, uno::UNO_QUERY_THROW );
- xFilter->filter( aMediaDesc.getAsConstPropertyValueList() );
- }
- catch( uno::Exception& )
- {
}
}
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index 9db6994..734ef1d 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -85,7 +85,7 @@
#include "svx/xlnstit.hxx"
#include "svx/sxmspitm.hxx"
-#include <oox/core/tokens.hxx>
+#include <oox/token/tokens.hxx>
#include <oox/export/drawingml.hxx>
#include <oox/export/chartexport.hxx>
#include <oox/export/utils.hxx>
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx
index 06a0811..2f580c4 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -25,6 +25,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
+#include "precompiled_sc.hxx"
// MARKER(update_precomp.py): autogen include statement, do not remove
#include <stdarg.h>
@@ -37,8 +38,8 @@
#include <rtl/random.h>
#include <sax/fshelper.hxx>
#include <unotools/streamwrap.hxx>
+#include <cppuhelper/implementationentry.hxx>
-#include "precompiled_sc.hxx"
#include "docuno.hxx"
#include "xestream.hxx"
#include "xladdress.hxx"
@@ -53,7 +54,7 @@
#include <../../ui/inc/viewdata.hxx>
#include <excdoc.hxx>
-#include <oox/core/tokens.hxx>
+#include <oox/token/tokens.hxx>
#include <oox/xls/excelvbaproject.hxx>
#include <formula/grammar.hxx>
#include <oox/export/drawingml.hxx>
@@ -971,8 +972,8 @@ sax_fastparser::FSHelperPtr XclXmlUtils::WriteFontData( sax_fastparser::FSHelper
// ============================================================================
-XclExpXmlStream::XclExpXmlStream( const Reference< XMultiServiceFactory >& rSMgr )
- : XmlFilterBase( rSMgr ),
+XclExpXmlStream::XclExpXmlStream( const Reference< XComponentContext >& rxComponent )
+ : XmlFilterBase( rxComponent ),
mpRoot( NULL )
{
}
@@ -1174,75 +1175,35 @@ Sequence< OUString > SAL_CALL XlsxExport_getSupportedServiceNames() throw()
return aSeq;
}
-Reference< XInterface > SAL_CALL XlsxExport_createInstance(const Reference< XMultiServiceFactory > & rSMgr ) throw( Exception )
+Reference< XInterface > SAL_CALL XlsxExport_createInstance(const Reference< XComponentContext > & rxComponent ) throw( Exception )
{
- return (cppu::OWeakObject*) new XclExpXmlStream( rSMgr );
+ return (cppu::OWeakObject*) new XclExpXmlStream( rxComponent );
}
-#ifdef __cplusplus
extern "C"
{
-#endif
SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /* ppEnv */ )
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /* pServiceManager */, void* pRegistryKey )
-{
- sal_Bool bRet = sal_False;
-
- if( pRegistryKey )
- {
- try
- {
- Reference< XRegistryKey > xNewKey1(
- static_cast< XRegistryKey* >( pRegistryKey )->createKey(
- OUString(RTL_CONSTASCII_USTRINGPARAM( IMPL_NAME "/UNO/SERVICES/" )) ) );
- xNewKey1->createKey( XlsxExport_getSupportedServiceNames().getConstArray()[0] );
-
- bRet = sal_True;
- }
- catch( InvalidRegistryException& )
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
- }
- }
-
- return bRet;
-}
-
// ------------------------
// - component_getFactory -
// ------------------------
-SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /* pRegistryKey */ )
+static ::cppu::ImplementationEntry const spServices[] =
{
- Reference< XSingleServiceFactory > xFactory;
- void* pRet = 0;
-
- if ( rtl_str_compare( pImplName, IMPL_NAME ) == 0 )
- {
- const OUString aServiceName(RTL_CONSTASCII_USTRINGPARAM(IMPL_NAME));
+ { XlsxExport_createInstance, XlsxExport_getImplementationName, XlsxExport_getSupportedServiceNames,
+ ::cppu::createSingleComponentFactory, 0, 0 },
+ { 0, 0, 0, 0, 0, 0 }
+};
- xFactory = Reference< XSingleServiceFactory >( ::cppu::createSingleFactory(
- reinterpret_cast< XMultiServiceFactory* >( pServiceManager ),
- XlsxExport_getImplementationName(),
- XlsxExport_createInstance,
- XlsxExport_getSupportedServiceNames() ) );
- }
-
- if ( xFactory.is() )
- {
- xFactory->acquire();
- pRet = xFactory.get();
- }
-
- return pRet;
+SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void *pRegistryKey )
+{
+ return ::cppu::component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey, spServices );
}
-#ifdef __cplusplus
-}
-#endif
+} // extern "C"
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index d9fc5d6..b8ba4b0 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -57,7 +57,7 @@
#include "globstr.hrc"
#include "xestring.hxx"
-#include <oox/core/tokens.hxx>
+#include <oox/token/tokens.hxx>
#include <boost/ptr_container/ptr_vector.hpp>
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index 5d33a85..a324b25 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -3846,7 +3846,6 @@ void XclImpDrawing::ImplConvertObjects( XclImpDffConverter& rDffConv, SdrModel&
//temp objects being inserted into the undo list
bool bOrigUndoStatus = rSdrModel.IsUndoEnabled();
rSdrModel.EnableUndo(false);
-
// register this drawing manager at the passed (global) DFF manager
rDffConv.InitializeDrawing( *this, rSdrModel, rSdrPage );
// process list of objects to be skipped
@@ -3859,7 +3858,6 @@ void XclImpDrawing::ImplConvertObjects( XclImpDffConverter& rDffConv, SdrModel&
rDffConv.ProcessDrawing( maDffStrm );
// unregister this drawing manager at the passed (global) DFF manager
rDffConv.FinalizeDrawing();
-
rSdrModel.EnableUndo(bOrigUndoStatus);
}
diff --git a/sc/source/filter/inc/ftools.hxx b/sc/source/filter/inc/ftools.hxx
index 16cc643..7c6ae4a 100644
--- a/sc/source/filter/inc/ftools.hxx
+++ b/sc/source/filter/inc/ftools.hxx
@@ -139,6 +139,82 @@ void insert_value( Type& rnBitField, InsertType nValue, sal_uInt8 nStartBit, sal
// ============================================================================
+/** Simple shared pointer (NOT thread-save, but faster than boost::shared_ptr). */
+template< typename Type >
+class ScfRef
+{
+ template< typename > friend class ScfRef;
+
+public:
+ typedef Type element_type;
+ typedef ScfRef this_type;
+
+ inline explicit ScfRef( element_type* pObj = 0 ) { eat( pObj ); }
+ inline /*implicit*/ ScfRef( const this_type& rRef ) { eat( rRef.mpObj, rRef.mpnCount ); }
+ template< typename Type2 >
+ inline /*implicit*/ ScfRef( const ScfRef< Type2 >& rRef ) { eat( rRef.mpObj, rRef.mpnCount ); }
+ inline ~ScfRef() { rel(); }
+
+ inline void reset( element_type* pObj = 0 ) { rel(); eat( pObj ); }
+ inline this_type& operator=( const this_type& rRef ) { if( this != &rRef ) { rel(); eat( rRef.mpObj, rRef.mpnCount ); } return *this; }
+ template< typename Type2 >
+ inline this_type& operator=( const ScfRef< Type2 >& rRef ) { rel(); eat( rRef.mpObj, rRef.mpnCount ); return *this; }
+
+ inline element_type* get() const { return mpObj; }
+ inline bool is() const { return mpObj != 0; }
+
+ inline element_type* operator->() const { return mpObj; }
+ inline element_type& operator*() const { return *mpObj; }
+
+ inline bool operator!() const { return mpObj == 0; }
+
+private:
+ inline void eat( element_type* pObj, size_t* pnCount = 0 ) { mpObj = pObj; mpnCount = mpObj ? (pnCount ? pnCount : new size_t( 0 )) : 0; if( mpnCount ) ++*mpnCount; }
+ inline void rel() { if( mpnCount && !--*mpnCount ) { DELETEZ( mpObj ); DELETEZ( mpnCount ); } }
+
+private:
+ Type* mpObj;
+ size_t* mpnCount;
+};
+
+template< typename Type >
+inline bool operator==( const ScfRef< Type >& rxRef1, const ScfRef< Type >& rxRef2 )
+{
+ return rxRef1.get() == rxRef2.get();
+}
+
+template< typename Type >
+inline bool operator!=( const ScfRef< Type >& rxRef1, const ScfRef< Type >& rxRef2 )
+{
+ return rxRef1.get() != rxRef2.get();
+}
+
+template< typename Type >
+inline bool operator<( const ScfRef< Type >& rxRef1, const ScfRef< Type >& rxRef2 )
+{
+ return rxRef1.get() < rxRef2.get();
+}
+
+template< typename Type >
+inline bool operator>( const ScfRef< Type >& rxRef1, const ScfRef< Type >& rxRef2 )
+{
+ return rxRef1.get() > rxRef2.get();
+}
+
+template< typename Type >
+inline bool operator<=( const ScfRef< Type >& rxRef1, const ScfRef< Type >& rxRef2 )
+{
+ return rxRef1.get() <= rxRef2.get();
+}
+
+template< typename Type >
+inline bool operator>=( const ScfRef< Type >& rxRef1, const ScfRef< Type >& rxRef2 )
+{
+ return rxRef1.get() >= rxRef2.get();
+}
+
+// ----------------------------------------------------------------------------
+
/**
* Template for a map of ref-counted objects with additional accessor functions.
*
diff --git a/sc/source/filter/inc/xestream.hxx b/sc/source/filter/inc/xestream.hxx
index 135e5ee..4f4c061 100644
--- a/sc/source/filter/inc/xestream.hxx
+++ b/sc/source/filter/inc/xestream.hxx
@@ -310,7 +310,7 @@ public:
class XclExpXmlStream : public oox::core::XmlFilterBase
{
public:
- XclExpXmlStream( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rSMgr );
+ XclExpXmlStream( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxComponent );
virtual ~XclExpXmlStream();
/** Returns the filter root data. */
diff --git a/sc/source/filter/inc/xiescher.hxx b/sc/source/filter/inc/xiescher.hxx
index 04652ce..667ba63 100644
--- a/sc/source/filter/inc/xiescher.hxx
+++ b/sc/source/filter/inc/xiescher.hxx
@@ -31,7 +31,6 @@
#include <vector>
#include <map>
-#include <hash_map>
#include <filter/msfilter/msdffimp.hxx>
#include <filter/msfilter/msocximex.hxx>
#include <vcl/graph.hxx>
@@ -1236,13 +1235,13 @@ public:
/** Returns the name of overridden name ( or zero length string ) for
associated object id. */
String GetOleNameOverride( SCTAB nTab, sal_uInt16 nObjId );
-
+ // ------------------------------------------------------------------------
private:
/** Reads and returns a bitmap from WMF/PICT format. */
- static void ReadWmf( Graphic& rGraphic, const XclImpRoot& rRoot, XclImpStream& rStrm );
+ static void ReadWmf( Graphic& rGraphic, XclImpStream& rStrm );
/** Reads and returns a bitmap from BMP format. */
- static void ReadBmp( Graphic& rGraphic, const XclImpRoot& rRoot, XclImpStream& rStrm );
+ static void ReadBmp( Graphic& rGraphic, XclImpStream& rStrm );
/** Reads contents of an DFF record and append data to internal DFF stream. */
void ReadDffRecord( XclImpStream& rStrm );
@@ -1251,76 +1250,13 @@ private:
/** Reads the TXO record and following CONTINUE records containing string and formatting. */
void ReadTxo( XclImpStream& rStrm );
-private:
- typedef ::std::map< sal_Size, XclImpDrawObjRef > XclImpObjMap;
- typedef ::std::map< sal_uInt16, XclImpDrawObjRef > XclImpObjMapById;
- typedef ScfRef< XclImpObjTextData > XclImpObjTextRef;
- typedef ::std::map< sal_Size, XclImpObjTextRef > XclImpObjTextMap;
-
- XclImpDrawObjVector maRawObjs; /// BIFF5 objects without DFF data.
- SvMemoryStream maDffStrm; /// Copy of the DFF page stream in memory.
- XclImpObjMap maObjMap; /// Maps BIFF8 drawing objects to DFF stream position.
- XclImpObjMapById maObjMapId; /// Maps BIFF8 drawing objects to object ID.
- XclImpObjTextMap maTextMap; /// Maps BIFF8 TXO textbox data to DFF stream position.
- ScfUInt16Vec maSkipObjs; /// IDs of all objects to be skipped.
- bool mbOleObjs; /// True = draw model supports OLE objects.
-};
-
-// ----------------------------------------------------------------------------
-
-/** Drawing manager of a single sheet. */
-class XclImpSheetDrawing : public XclImpDrawing
-{
-public:
- explicit XclImpSheetDrawing( const XclImpRoot& rRoot, SCTAB nScTab );
-
- /** Reads the NOTE record. */
- void ReadNote( XclImpStream& rStrm );
- /** Inserts a new chart object and reads the chart substream (BOF/EOF block).
- @descr Used to import chart sheets, which do not have a corresponding OBJ record. */
- void ReadTabChart( XclImpStream& rStrm );
-
- /** Returns the total cell range covered by any shapes in the sheet. */
- inline const ScRange& GetUsedArea() const { return maScUsedArea; }
- /** Converts all objects and inserts them into the sheet drawing page. */
- void ConvertObjects( XclImpDffConverter& rDffConv );
-
- /** Calculate the resulting rectangle of the passed anchor. */
- virtual Rectangle CalcAnchorRect( const XclObjAnchor& rAnchor, bool bDffAnchor ) const;
- /** On call, updates the used area of the sheet. */
- virtual void OnObjectInserted( const XclImpDrawObjBase& rDrawObj );
-
-private:
/** Reads a BIFF3-BIFF5 NOTE record. */
void ReadNote3( XclImpStream& rStrm );
/** Reads a BIFF8 NOTE record. */
void ReadNote8( XclImpStream& rStrm );
-private:
- ScRange maScUsedArea; /// Sheet index and used area in this sheet.
-};
-
-// The object manager =========================================================
-
-/** Stores all drawing and OLE objects and additional data related to these objects. */
-class XclImpObjectManager : protected XclImpRoot
-{
-public:
- explicit XclImpObjectManager( const XclImpRoot& rRoot );
- virtual ~XclImpObjectManager();
-
- /** Reads the MSODRAWINGGROUP record. */
- void ReadMsoDrawingGroup( XclImpStream& rStrm );
-
- /** Returns (initially creates) the drawing manager of the specified sheet. */
- XclImpSheetDrawing& GetSheetDrawing( SCTAB nScTab );
- /** Inserts all objects into the Calc document. */
- void ConvertObjects();
-
- /** Returns the default name for the passed object. */
- String GetDefaultObjName( const XclImpDrawObjBase& rDrawObj ) const;
- /** Returns the used area in the sheet with the passed index. */
- ScRange GetUsedArea( SCTAB nScTab ) const;
+ /** Returns the size of the progress bar shown while processing all objects. */
+ sal_Size GetProgressSize() const;
// ------------------------------------------------------------------------
private:
diff --git a/sc/source/filter/xcl97/XclExpChangeTrack.cxx b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
index 381ea84..1d44565 100644
--- a/sc/source/filter/xcl97/XclExpChangeTrack.cxx
+++ b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
@@ -39,9 +39,10 @@
#include "cell.hxx"
#include "xcl97rec.hxx"
-#include <oox/core/tokens.hxx>
+#include <oox/token/tokens.hxx>
#include <rtl/strbuf.hxx>
+using namespace oox;
using ::rtl::OUString;
using ::rtl::OString;
using ::rtl::OStringBuffer;
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index f5a403e..4e499f4 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -80,7 +80,7 @@
#include <com/sun/star/sheet/XCellAddressable.hpp>
#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
-#include <oox/core/tokens.hxx>
+#include <oox/token/tokens.hxx>
#include <oox/export/shapes.hxx>
#include <oox/export/utils.hxx>
#include <oox/export/vmlexport.hxx>
diff --git a/sc/source/filter/xml/sheetdata.cxx b/sc/source/filter/xml/sheetdata.cxx
index 33ec250..e81ddae 100644
--- a/sc/source/filter/xml/sheetdata.cxx
+++ b/sc/source/filter/xml/sheetdata.cxx
@@ -282,14 +282,4 @@ void ScSheetSaveData::SetInSupportedSave( bool bSet )
mbInSupportedSave = bSet;
}
-bool ScSheetSaveData::IsInSupportedSave() const
-{
- return mbInSupportedSave;
-}
-
-void ScSheetSaveData::SetInSupportedSave( bool bSet )
-{
- mbInSupportedSave = bSet;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index 6b58708..c10a737 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -1348,14 +1348,14 @@ AbstractScTabBgColorDlg * ScAbstractDialogFactory_Impl::CreateScTabBgColorDlg (
const String& rTitle,
const String& rTabBgColorNoColorText,
const Color& rDefaultColor,
- ULONG nHelpId ,
+ const rtl::OString& sHelpId ,
int nId )
{
ScTabBgColorDlg * pDlg=NULL;
switch ( nId )
{
case RID_SCDLG_TAB_BG_COLOR :
- pDlg = new ScTabBgColorDlg( pParent, rTitle, rTabBgColorNoColorText, rDefaultColor, nHelpId );
+ pDlg = new ScTabBgColorDlg( pParent, rTitle, rTabBgColorNoColorText, rDefaultColor, sHelpId );
break;
default:
break;
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 89a3d63..f568d65 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -2838,7 +2838,7 @@ BOOL ScDocFunc::DeleteTable( SCTAB nTab, BOOL bRecord, BOOL /* bApi */ )
{
if (bRecord)
{
- SvShorts theTabs;
+ std::vector<SCTAB> theTabs;
theTabs.push_back(nTab);
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoDeleteTab( &rDocShell, theTabs, pUndoDoc, pUndoData ));
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index ceaa1fb..28a723e 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1809,356 +1809,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;
-
- 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 );
- 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;
- }
- }
- }
- }
-
- 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/docshell/makefile.mk b/sc/source/ui/docshell/makefile.mk
index 33e500a..6e9d73e 100644
--- a/sc/source/ui/docshell/makefile.mk
+++ b/sc/source/ui/docshell/makefile.mk
@@ -96,7 +96,6 @@ EXCEPTIONSFILES= \
$(SLO)$/tablink.obj \
$(SLO)$/tpstat.obj
- $(SLO)$/docsh5.obj \
SRS1NAME=$(TARGET)
SRC1FILES = tpstat.src
diff --git a/sc/source/ui/drawfunc/objdraw.src b/sc/source/ui/drawfunc/objdraw.src
index 9c7227d..72a3996 100644
--- a/sc/source/ui/drawfunc/objdraw.src
+++ b/sc/source/ui/drawfunc/objdraw.src
@@ -190,7 +190,7 @@
MenuItem\
{\
Identifier = SID_DRAW_HLINK_EDIT ; \
- HelpID = CMD_SID_DRAW_HLINK_EDIT ; \
+ HelpID = HID_SCMENU_EDITLNK; \
Text [ en-US ] = "~Hyperlink..." ; \
};
@@ -198,7 +198,7 @@
MenuItem\
{\
Identifier = SID_DRAW_HLINK_DELETE ; \
- HelpID = CMD_SID_DRAW_HLINK_DELETE ; \
+ HelpID = HID_SCMENU_DELLNK; \
Text [ en-US ] = "~Remove Hyperlink" ; \
};
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index 5d9ec51..7910910 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -382,7 +382,8 @@ public:
void FindNextUnprot( BOOL bShift, BOOL bInSelection = TRUE );
- SC_DLLPUBLIC void SetTabNo( SCTAB nTab, BOOL bNew = FALSE, BOOL bExtendSelection = FALSE );
+ // bSameTabButMoved = true if the same sheet as before is activated, used after moving/copying/inserting/deleting a sheet
+ SC_DLLPUBLIC void SetTabNo( SCTAB nTab, BOOL bNew = FALSE, BOOL bExtendSelection = FALSE, bool bSameTabButMoved = false );
void SelectNextTab( short nDir, BOOL bExtendSelection = FALSE );
void ActivateView( BOOL bActivate, BOOL bFirst );
diff --git a/sc/source/ui/inc/undotab.hxx b/sc/source/ui/inc/undotab.hxx
index bf43322..7e473ff 100644
--- a/sc/source/ui/inc/undotab.hxx
+++ b/sc/source/ui/inc/undotab.hxx
@@ -130,7 +130,7 @@ public:
TYPEINFO();
ScUndoDeleteTab(
ScDocShell* pNewDocShell,
- const SvShorts &theTabs, //SCTAB nNewTab,
+ const std::vector<SCTAB> &theTabs,
ScDocument* pUndoDocument,
ScRefUndoData* pRefData );
virtual ~ScUndoDeleteTab();
@@ -143,7 +143,7 @@ public:
virtual String GetComment() const;
private:
- SvShorts theTabs;
+ std::vector<SCTAB> theTabs;
ULONG nStartChangeAction;
ULONG nEndChangeAction;
diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
index 07358e5..0259a70 100644
--- a/sc/source/ui/inc/viewfunc.hxx
+++ b/sc/source/ui/inc/viewfunc.hxx
@@ -270,7 +270,7 @@ public:
BOOL AppendTable( const String& rName, BOOL bRecord = TRUE );
BOOL DeleteTable( SCTAB nTabNr, BOOL bRecord = TRUE );
- BOOL DeleteTables(const SvShorts &TheTabs, BOOL bRecord = TRUE );
+ BOOL DeleteTables(const std::vector<SCTAB>& TheTabs, BOOL bRecord = TRUE );
BOOL RenameTable( const String& rName, SCTAB nTabNr );
void MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const String* pNewTabName = NULL );
diff --git a/sc/source/ui/src/popup.src b/sc/source/ui/src/popup.src
index b01e8b1..a466823 100644
--- a/sc/source/ui/src/popup.src
+++ b/sc/source/ui/src/popup.src
@@ -193,7 +193,7 @@ Menu RID_POPUP_TAB
MenuItem
{
Identifier = FID_TAB_EVENTS ;
- HelpId = FID_TAB_EVENTS ;
+ HelpId = CMD_FID_TAB_EVENTS ;
Text [ en-US ] = "Sheet E~vents..." ;
};
//------------------------------
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 3e3dbd9..a1e3134 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -252,7 +252,7 @@ void ScUndoInsertTables::Undo()
pDocShell->SetInUndo( TRUE ); //! BeginUndo
bDrawIsInUndo = TRUE;
- SvShorts TheTabs;
+ std::vector<SCTAB> TheTabs;
for(int i=0;i<pNameList->Count();i++)
{
TheTabs.push_back( sal::static_int_cast<short>(nTab+i) );
@@ -309,13 +309,14 @@ BOOL ScUndoInsertTables::CanRepeat(SfxRepeatTarget& rTarget) const
// Tabelle loeschen
//
-ScUndoDeleteTab::ScUndoDeleteTab( ScDocShell* pNewDocShell,const SvShorts &aTab, //SCTAB nNewTab,
- ScDocument* pUndoDocument, ScRefUndoData* pRefData ) :
+ScUndoDeleteTab::ScUndoDeleteTab( ScDocShell* pNewDocShell,
+ const std::vector<SCTAB> &aTab,
+ ScDocument* pUndoDocument,
+ ScRefUndoData* pRefData ) :
ScMoveUndo( pNewDocShell, pUndoDocument, pRefData, SC_UNDO_REFLAST )
{
- theTabs=aTab;
-
- SetChangeTrack();
+ theTabs.insert(theTabs.end(), aTab.begin(), aTab.end() );
+ SetChangeTrack();
}
ScUndoDeleteTab::~ScUndoDeleteTab()
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index d7fbbd2..d9fbabb 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -1396,9 +1396,9 @@ void ScDataPilotTableObj::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
const ScUpdateRefHint& rRef = static_cast< const ScUpdateRefHint& >( rHint );
if ( aRanges.UpdateReference( rRef.GetMode(), GetDocShell()->GetDocument(), rRef.GetRange(),
rRef.GetDx(), rRef.GetDy(), rRef.GetDz() ) &&
- aRanges.Count() == 1 )
+ aRanges.size() == 1 )
{
- const ScRange* pRange = aRanges.GetObject( 0 );
+ const ScRange* pRange = aRanges[0];
if ( pRange )
{
nTab = pRange->aStart.Tab();
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 3581f90..a065e1e 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -763,51 +763,6 @@ BOOL ScModelObj::FillRenderMarkData( const uno::Any& aSelection,
DBG_ASSERT( pDocShell, "FillRenderMarkData: DocShell must be set" );
BOOL bDone = FALSE;
-
- uno::Reference<frame::XController> xView;
-
- // defaults when no options are passed: all sheets, include empty pages
- sal_Bool bSelectedSheetsOnly = sal_False;
- sal_Bool bIncludeEmptyPages = sal_True;
-
- bool bHasPrintContent = false;
- sal_Int32 nPrintContent = 0; // all sheets / selected sheets / selected cells
- sal_Int32 nPrintRange = 0; // all pages / pages
- rtl::OUString aPageRange; // "pages" edit value
-
- for( sal_Int32 i = 0, nLen = rOptions.getLength(); i < nLen; i++ )
- {
- if( rOptions[i].Name.equalsAscii( "IsOnlySelectedSheets" ) )
- {
- rOptions[i].Value >>= bSelectedSheetsOnly;
- }
- else if( rOptions[i].Name.equalsAscii( "IsIncludeEmptyPages" ) )
- {
- rOptions[i].Value >>= bIncludeEmptyPages;
- }
- else if( rOptions[i].Name.equalsAscii( "PageRange" ) )
- {
- rOptions[i].Value >>= aPageRange;
- }
- else if( rOptions[i].Name.equalsAscii( "PrintRange" ) )
- {
- rOptions[i].Value >>= nPrintRange;
- }
- else if( rOptions[i].Name.equalsAscii( "PrintContent" ) )
- {
- bHasPrintContent = true;
- rOptions[i].Value >>= nPrintContent;
- }
- else if( rOptions[i].Name.equalsAscii( "View" ) )
- {
- rOptions[i].Value >>= xView;
- }
- }
-
- // "Print Content" selection wins over "Selected Sheets" option
- if ( bHasPrintContent )
- bSelectedSheetsOnly = ( nPrintContent != 0 );
-
uno::Reference<frame::XController> xView;
// defaults when no options are passed: all sheets, include empty pages
diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx
index 329cd70..7e8b982 100644
--- a/sc/source/ui/unoobj/fmtuno.cxx
+++ b/sc/source/ui/unoobj/fmtuno.cxx
@@ -510,9 +510,7 @@ ScTableConditionalFormat* ScTableConditionalFormat::getImplementation(
//------------------------------------------------------------------------
-ScTableConditionalEntry::ScTableConditionalEntry(ScTableConditionalFormat* pPar,
- const ScCondFormatEntryItem& aItem) :
- pParent( pPar ),
+ScTableConditionalEntry::ScTableConditionalEntry(const ScCondFormatEntryItem& aItem) :
aData( aItem )
{
// #i113668# only store the settings, keep no reference to parent object
diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx
index c116689..6a7ec4c 100644
--- a/sc/source/ui/unoobj/servuno.cxx
+++ b/sc/source/ui/unoobj/servuno.cxx
@@ -38,7 +38,6 @@
#include <com/sun/star/container/XNameAccess.hpp>
#include "servuno.hxx"
-#include "unoguard.hxx"
#include "unonames.hxx"
#include "cellsuno.hxx"
#include "fielduno.hxx"
diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx
index 75b369e..a474c70 100644
--- a/sc/source/ui/unoobj/viewuno.cxx
+++ b/sc/source/ui/unoobj/viewuno.cxx
@@ -668,7 +668,7 @@ void lcl_CallActivate( ScDocShell* pDocSh, SCTAB nTab, sal_Int32 nEvent )
}
}
-void ScTabViewObj::SheetChanged()
+void ScTabViewObj::SheetChanged( bool bSameTabButMoved )
{
if ( !GetViewShell() )
return;
diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx
index bd5ea87..9df4857 100644
--- a/sc/source/ui/vba/excelvbahelper.cxx
+++ b/sc/source/ui/vba/excelvbahelper.cxx
@@ -216,6 +216,15 @@ void implnPasteSpecial( const uno::Reference< frame::XModel>& xModel, USHORT nFl
}
+void implnCopyRange( const uno::Reference< frame::XModel>& xModel, const ScRange& rRange )
+{
+ ScTabViewShell* pViewShell = getBestViewShell( xModel );
+ if ( pViewShell )
+ {
+ pViewShell->CopyToClip( NULL, rRange, FALSE, TRUE, TRUE );
+ }
+}
+
ScDocShell*
getDocShell( const css::uno::Reference< css::frame::XModel>& xModel )
{
diff --git a/sc/source/ui/vba/excelvbahelper.hxx b/sc/source/ui/vba/excelvbahelper.hxx
index d152511..35908ec 100644
--- a/sc/source/ui/vba/excelvbahelper.hxx
+++ b/sc/source/ui/vba/excelvbahelper.hxx
@@ -52,6 +52,7 @@ void implnCopy( const css::uno::Reference< css::frame::XModel>& xModel );
void implnPaste ( const css::uno::Reference< css::frame::XModel>& xModel );
void implnCut( const css::uno::Reference< css::frame::XModel>& xModel );
void implnPasteSpecial( const css::uno::Reference< css::frame::XModel>& xModel, sal_uInt16 nFlags,sal_uInt16 nFunction,sal_Bool bSkipEmpty, sal_Bool bTranspose);
+void implnCopyRange( const css::uno::Reference< css::frame::XModel>& xModel, const ScRange& rRange );
ScTabViewShell* getBestViewShell( const css::uno::Reference< css::frame::XModel>& xModel ) ;
ScDocShell* getDocShell( const css::uno::Reference< css::frame::XModel>& xModel ) ;
ScTabViewShell* getCurrentBestViewShell( const css::uno::Reference< css::uno::XComponentContext >& xContext );
diff --git a/sc/source/ui/vba/vbaeventshelper.cxx b/sc/source/ui/vba/vbaeventshelper.cxx
index 1fe22d9..bc1bbc0 100644
--- a/sc/source/ui/vba/vbaeventshelper.cxx
+++ b/sc/source/ui/vba/vbaeventshelper.cxx
@@ -729,8 +729,8 @@ namespace {
bool lclSelectionChanged( const ScRangeList& rLeft, const ScRangeList& rRight )
{
// one of the range lists empty? -> return false, if both lists empty
- bool bLeftEmpty = rLeft.count() == 0;
- bool bRightEmpty = rRight.count() == 0;
+ bool bLeftEmpty = rLeft.size() == 0;
+ bool bRightEmpty = rRight.size() == 0;
if( bLeftEmpty || bRightEmpty )
return !(bLeftEmpty && bRightEmpty);
diff --git a/sc/source/ui/vba/vbaeventshelper.hxx b/sc/source/ui/vba/vbaeventshelper.hxx
index 3bd9655..dbcb232 100644
--- a/sc/source/ui/vba/vbaeventshelper.hxx
+++ b/sc/source/ui/vba/vbaeventshelper.hxx
@@ -78,9 +78,9 @@ private:
private:
mutable css::uno::WeakReference< ov::excel::XApplication > mxApplication;
::rtl::Reference< ScVbaEventsListener > mxListener;
+ css::uno::Any maOldSelection;
ScDocShell* mpDocShell;
ScDocument* mpDoc;
- ScRangeList maOldSelection;
bool mbOpened;
};
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index a09effa..7483455 100755
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -2248,66 +2248,30 @@ ScVbaRange::CellsHelper( const uno::Reference< ov::XHelperInterface >& xParent,
// set in the Any, we should convert as appropriate
// #FIXME - perhaps worth turning this into some sort of
// convertion routine e.g. bSuccess = getValueFromAny( nRow, nRowIndex, getCppuType((sal_Int32*)0) )
- uno::Any aRowIndexAny = nRowIndex;
- if ( aRowIndexAny.getValueTypeClass() == uno::TypeClass_INTERFACE )
+ if ( nRowIndex.hasValue() && !( nRowIndex >>= nRow ) )
{
+ uno::Reference< script::XTypeConverter > xConverter = getTypeConverter( xContext );
+ uno::Any aConverted;
try
{
- aRowIndexAny = getDefaultPropByIntrospection( aRowIndexAny );
+ aConverted = xConverter->convertTo( nRowIndex, getCppuType((sal_Int32*)0) );
+ bIsIndex = ( aConverted >>= nRow );
}
- catch( uno::Exception& ) {}
+ catch( uno::Exception& ) {} // silence any errors
}
- else if ( aRowIndexAny.hasValue() && !( aRowIndexAny >>= nRow ) )
+ if ( bIsColumnIndex && !( nColumnIndex >>= nColumn ) )
{
uno::Reference< script::XTypeConverter > xConverter = getTypeConverter( xContext );
uno::Any aConverted;
try
{
- aConverted = xConverter->convertTo( aRowIndexAny, getCppuType((sal_Int32*)0) );
- bIsIndex = ( aConverted >>= nRow );
+ aConverted = xConverter->convertTo( nColumnIndex, getCppuType((sal_Int32*)0) );
+ bIsColumnIndex = ( aConverted >>= nColumn );
}
catch( uno::Exception& ) {} // silence any errors
}
- uno::Any aColumnAny = nColumnIndex;
-
- if ( bIsColumnIndex )
- {
- // Column index can be a col address e.g Cells( 1, "B" ) etc.
- rtl::OUString sCol;
- if ( nColumnIndex >>= sCol )
- {
- ScAddress::Details dDetails( formula::FormulaGrammar::CONV_XL_A1, 0, 0 );
- ScRange tmpRange;
- USHORT flags = tmpRange.ParseCols( sCol, excel::GetDocumentFromRange( mxRange ), dDetails );
- if ( ( flags & 0x200 ) != 0x200 )
- throw uno::RuntimeException();
- nColumn = tmpRange.aStart.Col() + 1;
- }
- else
- {
- if ( aColumnAny.getValueTypeClass() == uno::TypeClass_INTERFACE )
- {
- try
- {
- aColumnAny = getDefaultPropByIntrospection( aColumnAny );
- }
- catch( uno::Exception& ) {}
- }
- if ( !( aColumnAny >>= nColumn ) )
- {
- uno::Reference< script::XTypeConverter > xConverter = getTypeConverter( mxContext );
- uno::Any aConverted;
- try
- {
- aConverted = xConverter->convertTo( aColumnAny, getCppuType((sal_Int32*)0) );
- bIsColumnIndex = ( aConverted >>= nColumn );
- }
- catch( uno::Exception& ) {} // silence any errors
- }
- }
- }
- RangeHelper thisRange( mxRange );
+ RangeHelper thisRange( xRange );
table::CellRangeAddress thisRangeAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
uno::Reference< table::XCellRange > xSheetRange = thisRange.getCellRangeFromSheet();
if( !bIsIndex && !bIsColumnIndex ) // .Cells
@@ -3871,7 +3835,7 @@ ScVbaRange::getColumnWidth() throw (uno::RuntimeException)
if ( pShell )
{
uno::Reference< frame::XModel > xModel = pShell->GetModel();
- double defaultCharWidth = getDefaultCharWidth( pShell );
+ double defaultCharWidth = getDefaultCharWidth( xModel );
RangeHelper thisRange( mxRange );
table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
sal_Int32 nStartCol = thisAddress.StartColumn;
@@ -3913,9 +3877,9 @@ ScVbaRange::setColumnWidth( const uno::Any& _columnwidth ) throw (uno::RuntimeEx
ScDocShell* pDocShell = getScDocShell();
if ( pDocShell )
{
- uno::Reference< frame::XModel > xModel = pDocShell->GetModel();
- if ( xModel.is() )
- {
+ uno::Reference< frame::XModel > xModel = pDocShell->GetModel();
+ if ( !xModel.is() )
+ return;
nColWidth = ( nColWidth * getDefaultCharWidth( xModel ) );
RangeHelper thisRange( mxRange );
diff --git a/sc/source/ui/vba/vbasheetobject.cxx b/sc/source/ui/vba/vbasheetobject.cxx
index c33a8b6..6464ebf 100644
--- a/sc/source/ui/vba/vbasheetobject.cxx
+++ b/sc/source/ui/vba/vbasheetobject.cxx
@@ -248,7 +248,7 @@ sal_Int32 SAL_CALL ScVbaSheetObjectBase::getPlacement() throw (uno::RuntimeExcep
SdrObject* pObj = pShape->GetSdrObject();
if (pObj)
{
- ScAnchorType eType = ScDrawLayer::GetAnchorType(pObj);
+ ScAnchorType eType = ScDrawLayer::GetAnchorType(*pObj);
if (eType == SCA_PAGE)
nRet = excel::XlPlacement::xlFreeFloating;
}
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index fc5c923..08258ff 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>
@@ -477,40 +476,6 @@ USHORT ScPreviewShell::SetPrinter( SfxPrinter *pNewPrinter, USHORT nDiffFlags, b
return pDocShell->SetPrinter( pNewPrinter, nDiffFlags );
}
-PrintDialog* 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();
@@ -521,66 +486,6 @@ SfxTabPage* ScPreviewShell::CreatePrintOptionsPage( Window *pParent, const SfxIt
return 0;
}
-void 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 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(RTL_CONSTASCII_USTRINGPARAM( "PrintSheets" ));
- aProps[0].Value <<= aSheets;
- SetAdditionalPrintOptions( aProps );
-
- SfxViewShell::Print( rProgress, bIsAPI, pPrintDialog );
- pDocShell->Print( rProgress, pPrintDialog, &aMarkData, pPreview, FALSE, bIsAPI );
-
- return 0;
-}
-
//------------------------------------------------------------------------
void ScPreviewShell::Activate(BOOL bMDI)
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 920db77..ff725f9 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -47,7 +47,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>
@@ -1098,62 +1097,6 @@ USHORT ScTabViewShell::SetPrinter( SfxPrinter *pNewPrinter, USHORT nDiffFlags, b
return GetViewData()->GetDocShell()->SetPrinter( pNewPrinter, nDiffFlags );
}
-PrintDialog* 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 );
-
- ScMarkData aMarkData;
- aMarkData.SelectTable( GetViewData()->GetTabNo(), TRUE );
-
- for ( SCTAB i=0; i<nTabCount; i++ )
- {
- if ( !bAllTabs && !aMarkData.GetTableSelect( i ) )
- continue;
- 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();
@@ -1164,78 +1107,6 @@ SfxTabPage* ScTabViewShell::CreatePrintOptionsPage( Window *pParent, const SfxIt
return 0;
}
-void 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(RTL_CONSTASCII_USTRINGPARAM("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 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/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx
index ac0ca96..3646a7a 100644
--- a/sc/source/ui/view/tabvwshe.cxx
+++ b/sc/source/ui/view/tabvwshe.cxx
@@ -97,8 +97,10 @@ String ScTabViewShell::GetSelectionText( BOOL bWholeWord )
SCCOL nCol1, nCol2;
SCROW nRow1, nRow2;
SCTAB nTab1, nTab2;
+ bool bShrunk;
aRange.GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
- if (pDoc->ShrinkToUsedDataArea( nTab1, nCol1, nRow1, nCol2, nRow2, false))
+ pDoc->ShrinkToUsedDataArea( bShrunk, nTab1, nCol1, nRow1, nCol2, nRow2, false);
+ if (bShrunk)
{
aRange.aStart.SetCol( nCol1 );
aRange.aStart.SetRow( nRow1 );
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index d845cf1..57f9305 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -425,7 +425,8 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
aDlgTitle,
String(ScResId(SCSTR_NAME)),
aName,
- nSlot,RID_SCDLG_STRINPUT);
+ GetStaticInterface()->GetSlot(nSlot)->GetCommand(),
+ pHelpId, RID_SCDLG_STRINPUT);
DBG_ASSERT(pDlg, "Dialog create fail!");
while ( !bDone && nRet == RET_OK )
@@ -638,7 +639,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
SCTAB nFirstTab=0;
BOOL bTabFlag=FALSE;
ScMarkData& rMark = pViewData->GetMarkData();
- SvShorts TheTabs;
+ std::vector<SCTAB> TheTabs;
for(SCTAB i=0;i<nTabCount;i++)
{
if(rMark.GetTableSelect(i) &&!pDoc->IsTabProtected(i))
@@ -760,7 +761,8 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
String(ScResId(SCSTR_SET_TAB_BG_COLOR)),
String(ScResId(SCSTR_NO_TAB_BG_COLOR)),
aTabBgColor,
- nSlot,RID_SCDLG_TAB_BG_COLOR);
+ CMD_FID_TAB_SET_TAB_BG_COLOR,
+ RID_SCDLG_TAB_BG_COLOR);
while ( !bDone && nRet == RET_OK )
{
nRet = pDlg->Execute();
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 55b2520..54c1e36 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -3105,43 +3105,4 @@ void ScViewData::AddPixelsWhileBackward( long & rScrY, long nEndPixels,
rPosY = nRow;
}
-void ScViewData::AddPixelsWhileBackward( long & rScrY, long nEndPixels,
- SCROW & rPosY, SCROW nStartRow, double nPPTY, const ScDocument * pDoc,
- SCTAB nTabNo )
-{
- SCROW nRow = rPosY;
- while (rScrY <= nEndPixels && nRow >= nStartRow)
- {
- SCROW nHeightStartRow;
- USHORT nHeight = pDoc->GetRowHeight( nRow, nTabNo, &nHeightStartRow, NULL);
- if (nHeightStartRow < nStartRow)
- nHeightStartRow = nStartRow;
- if (!nHeight)
- nRow = nHeightStartRow - 1;
- else
- {
- SCROW nRows = nRow - nHeightStartRow + 1;
- sal_Int64 nPixel = ToPixel( nHeight, nPPTY);
- sal_Int64 nAdd = nPixel * nRows;
- if (nAdd + rScrY > nEndPixels)
- {
- sal_Int64 nDiff = nAdd + rScrY - nEndPixels;
- nRows -= static_cast<SCROW>(nDiff / nPixel);
- nAdd = nPixel * nRows;
- // We're looking for a value that satisfies loop condition.
- if (nAdd + rScrY <= nEndPixels)
- {
- ++nRows;
- nAdd += nPixel;
- }
- }
- rScrY += static_cast<long>(nAdd);
- nRow -= nRows;
- }
- }
- if (nRow < rPosY)
- ++nRow;
- rPosY = nRow;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 471cfaa..9ff0416 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -2195,13 +2195,12 @@ BOOL ScViewFunc::DeleteTable( SCTAB nTab, BOOL bRecord )
return bSuccess;
}
-BOOL ScViewFunc::DeleteTables(const SvShorts &TheTabs, BOOL bRecord )
+BOOL ScViewFunc::DeleteTables(const std::vector<SCTAB>& TheTabs, BOOL bRecord )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
BOOL bVbaEnabled = pDoc ? pDoc->IsInVBAMode() : FALSE;
SCTAB nNewTab = TheTabs[0];
- int i;
WaitObject aWait( GetFrameWin() );
if (bRecord && !pDoc->IsUndoEnabled())
bRecord = FALSE;
More information about the Libreoffice-commits
mailing list