summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorDaniel Rentz <dr@openoffice.org>2010-06-15 20:02:53 +0200
committerDaniel Rentz <dr@openoffice.org>2010-06-15 20:02:53 +0200
commit5624330c20ccbbcbbbc90631130e7d2f7a06d0bd (patch)
tree27308cb5a7f8c3eca0655d99c1fd654d8580de7a /sc/inc
parentfc1ac6254cde85bedfff1f8f78d678d4e10cc3dd (diff)
mib16: contributed bugfixes and various new symbols in VBA compatibility implementation
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/cellsuno.hxx8
-rw-r--r--sc/inc/convuno.hxx41
-rw-r--r--sc/inc/document.hxx8
-rw-r--r--sc/inc/docuno.hxx1
-rw-r--r--sc/inc/funcuno.hxx3
-rw-r--r--sc/inc/sc.hrc1
-rw-r--r--sc/inc/table.hxx10
-rw-r--r--sc/inc/unonames.hxx5
-rw-r--r--sc/inc/viewuno.hxx5
9 files changed, 79 insertions, 3 deletions
diff --git a/sc/inc/cellsuno.hxx b/sc/inc/cellsuno.hxx
index 13469b110455..a53f167b164a 100644
--- a/sc/inc/cellsuno.hxx
+++ b/sc/inc/cellsuno.hxx
@@ -90,6 +90,7 @@
#include <com/sun/star/document/XActionLockable.hpp>
#include <com/sun/star/beans/XTolerantMultiPropertySet.hpp>
#include <com/sun/star/sheet/XExternalSheetName.hpp>
+#include <com/sun/star/document/XEventsSupplier.hpp>
#include <cppuhelper/implbase2.hxx>
#include <cppuhelper/implbase3.hxx>
@@ -1002,7 +1003,8 @@ class ScTableSheetObj : public ScCellRangeObj,
public com::sun::star::util::XProtectable,
public com::sun::star::sheet::XScenario,
public com::sun::star::sheet::XScenarioEnhanced,
- public com::sun::star::sheet::XExternalSheetName
+ public com::sun::star::sheet::XExternalSheetName,
+ public com::sun::star::document::XEventsSupplier
{
friend class ScTableSheetsObj; // fuer insertByName()
@@ -1207,6 +1209,10 @@ public:
throw (::com::sun::star::container::ElementExistException,
::com::sun::star::uno::RuntimeException);
+ // XEventsSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL getEvents()
+ throw (::com::sun::star::uno::RuntimeException);
+
// XPropertySet ueberladen wegen Sheet-Properties
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
SAL_CALL getPropertySetInfo()
diff --git a/sc/inc/convuno.hxx b/sc/inc/convuno.hxx
index 135ac055b2fe..0f93d6d6de0d 100644
--- a/sc/inc/convuno.hxx
+++ b/sc/inc/convuno.hxx
@@ -28,6 +28,7 @@
#ifndef SC_CONVUNO_HXX
#define SC_CONVUNO_HXX
+#include <algorithm>
#include <i18npool/lang.h>
#include <com/sun/star/table/CellAddress.hpp>
#include <com/sun/star/table/CellRangeAddress.hpp>
@@ -70,6 +71,19 @@ public:
static inline void FillApiEndAddress(
::com::sun::star::table::CellAddress& rApiAddress,
const ::com::sun::star::table::CellRangeAddress& rApiRange );
+
+ /** Returns true, if the passed ranges have at least one common cell. */
+ static inline bool Intersects(
+ const ::com::sun::star::table::CellRangeAddress& rApiARange1,
+ const ::com::sun::star::table::CellRangeAddress& rApiARange2 );
+ /** Returns true, if the passed address rApiInner is inside the passed range rApiOuter. */
+ static inline bool Contains(
+ const ::com::sun::star::table::CellRangeAddress& rApiOuter,
+ const ::com::sun::star::table::CellAddress& rApiInner );
+ /** Returns true, if the passed range rApiInner is completely inside the passed range rApiOuter. */
+ static inline bool Contains(
+ const ::com::sun::star::table::CellRangeAddress& rApiOuter,
+ const ::com::sun::star::table::CellRangeAddress& rApiInner );
};
@@ -135,6 +149,33 @@ inline void ScUnoConversion::FillApiEndAddress(
rApiAddress.Sheet = rApiRange.Sheet;
}
+inline bool ScUnoConversion::Intersects(
+ const ::com::sun::star::table::CellRangeAddress& rApiRange1,
+ const ::com::sun::star::table::CellRangeAddress& rApiRange2 )
+{
+ return (rApiRange1.Sheet == rApiRange2.Sheet) &&
+ (::std::max( rApiRange1.StartColumn, rApiRange2.StartColumn ) <= ::std::min( rApiRange1.EndColumn, rApiRange2.EndColumn )) &&
+ (::std::max( rApiRange1.StartRow, rApiRange2.StartRow ) <= ::std::min( rApiRange1.EndRow, rApiRange2.EndRow ));
+}
+
+inline bool ScUnoConversion::Contains(
+ const ::com::sun::star::table::CellRangeAddress& rApiOuter,
+ const ::com::sun::star::table::CellAddress& rApiInner )
+{
+ return (rApiOuter.Sheet == rApiInner.Sheet) &&
+ (rApiOuter.StartColumn <= rApiInner.Column) && (rApiInner.Column <= rApiOuter.EndColumn) &&
+ (rApiOuter.StartRow <= rApiInner.Row) && (rApiInner.Row <= rApiOuter.EndRow);
+}
+
+inline bool ScUnoConversion::Contains(
+ const ::com::sun::star::table::CellRangeAddress& rApiOuter,
+ const ::com::sun::star::table::CellRangeAddress& rApiInner )
+{
+ return (rApiOuter.Sheet == rApiInner.Sheet) &&
+ (rApiOuter.StartColumn <= rApiInner.StartColumn) && (rApiInner.EndColumn <= rApiOuter.EndColumn) &&
+ (rApiOuter.StartRow <= rApiInner.StartRow) && (rApiInner.EndRow <= rApiOuter.EndRow);
+}
+
//___________________________________________________________________
inline sal_Bool operator==(
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index ad8f56600531..e59b7fda095a 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -731,6 +731,14 @@ public:
BOOL HasBackgroundDraw( SCTAB nTab, const Rectangle& rMMRect );
BOOL HasAnyDraw( SCTAB nTab, const Rectangle& rMMRect );
+ const ScSheetEvents* GetSheetEvents( SCTAB nTab ) const;
+ void SetSheetEvents( SCTAB nTab, const ScSheetEvents* pNew );
+ bool HasSheetEventScript( sal_Int32 nEvent ) const; // on any sheet
+
+ BOOL HasCalcNotification( SCTAB nTab ) const;
+ void SetCalcNotification( SCTAB nTab );
+ void ResetCalcNotifications();
+
SC_DLLPUBLIC ScOutlineTable* GetOutlineTable( SCTAB nTab, BOOL bCreate = FALSE );
BOOL SetOutlineTable( SCTAB nTab, const ScOutlineTable* pNewOutline );
diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx
index 15a0c5e72359..2c3ecee39e32 100644
--- a/sc/inc/docuno.hxx
+++ b/sc/inc/docuno.hxx
@@ -112,6 +112,7 @@ private:
const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& rOptions,
ScMarkData& rMark, ScPrintSelectionStatus& rStatus, String& rPagesStr ) const;
com::sun::star::uno::Reference<com::sun::star::uno::XAggregation> GetFormatter();
+ void HandleCalculateEvents();
rtl::OUString maBuildId;
sal_Int32 mnXlsWriteProtPass;
diff --git a/sc/inc/funcuno.hxx b/sc/inc/funcuno.hxx
index 3eef9082e26d..4413782a0e2f 100644
--- a/sc/inc/funcuno.hxx
+++ b/sc/inc/funcuno.hxx
@@ -72,7 +72,8 @@ private:
ScTempDocCache aDocCache;
ScDocOptions* pOptions;
SfxItemPropertyMap aPropertyMap;
- BOOL bInvalid;
+ bool mbArray;
+ bool mbValid;
public:
ScFunctionAccess();
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index a7d05925957a..9a2401f21ce5 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -833,6 +833,7 @@
#define FID_TAB_INDEX (TAB_POPUP_START+6)
#define FID_TAB_RTL (TAB_POPUP_START+7)
#define FID_TAB_DESELECTALL (TAB_POPUP_START+8)
+#define FID_TAB_EVENTS (TAB_POPUP_START+9)
#define TAB_POPUP_END (DATA_MENU_END + 20)
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 42fcbb063930..2d68d35545ea 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -63,6 +63,7 @@ class ScPrintSaverTab;
class ScProgress;
class ScProgress;
class ScRangeList;
+class ScSheetEvents;
class ScSortInfoArray;
class ScStyleSheet;
class ScTableLink;
@@ -118,6 +119,8 @@ private:
ScOutlineTable* pOutlineTable;
+ ScSheetEvents* pSheetEvents;
+
SCCOL nTableAreaX;
SCROW nTableAreaY;
BOOL bTableAreaValid;
@@ -126,6 +129,7 @@ private:
BOOL bVisible;
BOOL bStreamValid;
BOOL bPendingRowHeights;
+ BOOL bCalcNotification;
SCTAB nTab;
USHORT nRecalcLvl; // Rekursionslevel Size-Recalc
@@ -189,6 +193,9 @@ public:
void RemoveSubTotals( ScSubTotalParam& rParam );
BOOL DoSubTotals( ScSubTotalParam& rParam );
+ const ScSheetEvents* GetSheetEvents() const { return pSheetEvents; }
+ void SetSheetEvents( const ScSheetEvents* pNew );
+
BOOL IsVisible() const { return bVisible; }
void SetVisible( BOOL bVis );
@@ -198,6 +205,9 @@ public:
BOOL IsPendingRowHeights() const { return bPendingRowHeights; }
void SetPendingRowHeights( BOOL bSet );
+ BOOL GetCalcNotification() const { return bCalcNotification; }
+ void SetCalcNotification( BOOL bSet );
+
BOOL IsLayoutRTL() const { return bLayoutRTL; }
BOOL IsLoadingRTL() const { return bLoadingRTL; }
void SetLayoutRTL( BOOL bSet );
diff --git a/sc/inc/unonames.hxx b/sc/inc/unonames.hxx
index 5bcc22ae72d3..83065891c6f0 100644
--- a/sc/inc/unonames.hxx
+++ b/sc/inc/unonames.hxx
@@ -631,5 +631,10 @@
#define SC_UNO_SHAREDOC "IsDocumentShared"
+// EventDescriptor
+
+#define SC_UNO_EVENTTYPE "EventType"
+#define SC_UNO_SCRIPT "Script"
+
#endif
diff --git a/sc/inc/viewuno.hxx b/sc/inc/viewuno.hxx
index 988602b2056f..19b5c60fd070 100644
--- a/sc/inc/viewuno.hxx
+++ b/sc/inc/viewuno.hxx
@@ -48,6 +48,8 @@
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/datatransfer/XTransferableSupplier.hpp>
+#include "address.hxx"
+
class ScTabViewShell;
#define SC_VIEWPANE_ACTIVE 0xFFFF
@@ -195,6 +197,7 @@ private:
XViewPropertyChangeListenerArr_Impl aPropertyChgListeners;
XMouseClickHandlerArr_Impl aMouseClickHandlers;
XActivationEventListenerArr_Impl aActivationListeners;
+ SCTAB nPreviousTab;
sal_Bool bDrawSelModeSet;
ScViewPaneObj* GetObjectByIndex_Impl(USHORT nIndex) const;
@@ -223,7 +226,7 @@ public:
void SelectionChanged();
void VisAreaChanged();
void SheetChanged();
- sal_Bool IsMouseListening() { return aMouseClickHandlers.Count() > 0; }
+ bool IsMouseListening() const;
sal_Bool MousePressed( const ::com::sun::star::awt::MouseEvent& e ) throw (::com::sun::star::uno::RuntimeException);
sal_Bool MouseReleased( const ::com::sun::star::awt::MouseEvent& e ) throw (::com::sun::star::uno::RuntimeException);