summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorNoel Power <noel.power@novell.com>2010-10-06 10:15:43 +0100
committerNoel Power <noel.power@novell.com>2010-10-06 10:15:43 +0100
commitf13fd7b138caee676cf5dbeae3474e4a4b0b177a (patch)
tree58bbab934d3fd26a8fd886a2dbc52b5a2d283092 /sc/inc
parent44231089eeda805727f6c7143729612059891b02 (diff)
initial commit for vba blob ( not including container_control stuff )
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/address.hxx3
-rw-r--r--sc/inc/addruno.hxx2
-rw-r--r--sc/inc/appoptio.hxx5
-rw-r--r--sc/inc/cell.hxx2
-rw-r--r--sc/inc/document.hxx17
-rw-r--r--sc/inc/global.hxx1
-rw-r--r--sc/inc/globstr.hrc18
-rw-r--r--sc/inc/rangenam.hxx2
-rw-r--r--sc/inc/sc.hrc7
-rw-r--r--sc/inc/scabstdlg.hxx13
-rw-r--r--sc/inc/scmod.hxx4
-rw-r--r--sc/inc/shapeuno.hxx2
-rw-r--r--sc/inc/table.hxx3
-rw-r--r--sc/inc/unonames.hxx4
-rw-r--r--sc/inc/userdat.hxx4
-rw-r--r--sc/inc/viewuno.hxx8
16 files changed, 79 insertions, 16 deletions
diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx
index 15084565dfe0..bb4e97d45cf8 100644
--- a/sc/inc/address.hxx
+++ b/sc/inc/address.hxx
@@ -232,6 +232,9 @@ inline SCTAB SanitizeTab( SCTAB nTab, SCTAB nMaxTab )
#define SCA_VALID_ROW 0x0100
#define SCA_VALID_COL 0x0200
#define SCA_VALID_TAB 0x0400
+// SCA_BITS is a convience for
+// (SCA_VALID_TAB | SCA_VALID_COL | SCA_VALID_ROW | SCA_TAB_3D | SCA_TAB_ABSOLUTE | SCA_ROW_ABSOLUTE | SCA_COL_ABSOLUTE)
+#define SCA_BITS 0x070F
// somewhat cheesy kludge to force the display of the document name even for
// local references. Requires TAB_3D to be valid
#define SCA_FORCE_DOC 0x0800
diff --git a/sc/inc/addruno.hxx b/sc/inc/addruno.hxx
index d6df571a29aa..6e71230b21d4 100644
--- a/sc/inc/addruno.hxx
+++ b/sc/inc/addruno.hxx
@@ -47,7 +47,7 @@ private:
sal_Int32 nRefSheet;
sal_Bool bIsRange;
- sal_Bool ParseUIString( const String& rUIString );
+ sal_Bool ParseUIString( const String& rUIString, ::formula::FormulaGrammar::AddressConvention eConv = ::formula::FormulaGrammar::CONV_OOO );
public:
diff --git a/sc/inc/appoptio.hxx b/sc/inc/appoptio.hxx
index 91fc43fc249a..6c46e5c60a83 100644
--- a/sc/inc/appoptio.hxx
+++ b/sc/inc/appoptio.hxx
@@ -44,6 +44,10 @@ public:
void SetDefaults();
+ // Set or get the initial tab count for new spreadsheet, it is used by VBA API currently.
+ void SetTabCountInNewSpreadsheet( sal_Int16 nCount ) { nTabCountInNewSpreadsheet = nCount; }
+ sal_Int16 GetTabCountInNewSpreadsheet() const { return nTabCountInNewSpreadsheet; }
+
void SetAppMetric( FieldUnit eUnit ) { eMetric = eUnit; }
FieldUnit GetAppMetric() const { return eMetric; }
void SetZoom( USHORT nNew ) { nZoom = nNew; }
@@ -87,6 +91,7 @@ public:
const ScAppOptions& operator= ( const ScAppOptions& rOpt );
private:
+ sal_Int16 nTabCountInNewSpreadsheet;
FieldUnit eMetric;
USHORT nLRUFuncCount;
USHORT* pLRUList;
diff --git a/sc/inc/cell.hxx b/sc/inc/cell.hxx
index b4c5ebb44057..adc2ca8da5a3 100644
--- a/sc/inc/cell.hxx
+++ b/sc/inc/cell.hxx
@@ -406,7 +406,7 @@ public:
const formula::FormulaGrammar::Grammar = formula::FormulaGrammar::GRAM_DEFAULT ) const;
void SetDirty();
- inline void SetDirtyVar() { bDirty = TRUE; }
+ void SetDirtyVar();
// If setting entire document dirty after load, no broadcasts but still append to FormulaTree.
void SetDirtyAfterLoad();
inline void ResetTableOpDirtyVar() { bTableOpDirty = FALSE; }
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 0b66a0c18b9f..205401d9eedb 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -103,6 +103,7 @@ class ScDrawLayer;
class ScExtDocOptions;
class ScExternalRefManager;
class ScFormulaCell;
+class ScMacroManager;
class ScMarkData;
class ScOutlineTable;
class ScPatternAttr;
@@ -305,6 +306,8 @@ private:
::std::auto_ptr<ScClipParam> mpClipParam;
::std::auto_ptr<ScExternalRefManager> pExternalRefMgr;
+ ::std::auto_ptr<ScMacroManager> mpMacroMgr;
+
// mutable for lazy construction
mutable ::std::auto_ptr< ScFormulaParserPool >
@@ -461,6 +464,8 @@ public:
const String& GetCodeName() const { return aDocCodeName; }
void SetCodeName( const String& r ) { aDocCodeName = r; }
+ SC_DLLPUBLIC NameToNameMap* GetLocalNameMap( SCTAB& rTab );
+
void GetDocStat( ScDocStat& rDocStat );
SC_DLLPUBLIC void InitDrawLayer( SfxObjectShell* pDocShell = NULL );
@@ -580,6 +585,7 @@ public:
BOOL HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow,
const ScMarkData& rMark ) const;
+ BOOL HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTAB ) const;
BOOL GetMatrixFormulaRange( const ScAddress& rCellPos, ScRange& rMatrix );
@@ -950,7 +956,7 @@ public:
SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab,
ScDirection eDir );
- void FindAreaPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, SCsCOL nMovX, SCsROW nMovY );
+ SC_DLLPUBLIC void FindAreaPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, SCsCOL nMovX, SCsROW nMovY );
SC_DLLPUBLIC void GetNextPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, SCsCOL nMovX, SCsROW nMovY,
BOOL bMarked, BOOL bUnprotected, const ScMarkData& rMark );
@@ -971,7 +977,7 @@ public:
SCROW nStartRow, SCSIZE nSize,
ScDocument* pRefUndoDoc = NULL, BOOL* pUndoOutline = NULL,
const ScMarkData* pTabMark = NULL );
- void DeleteRow( const ScRange& rRange,
+ SC_DLLPUBLIC void DeleteRow( const ScRange& rRange,
ScDocument* pRefUndoDoc = NULL, BOOL* pUndoOutline = NULL );
BOOL InsertCol( SCROW nStartRow, SCTAB nStartTab,
SCROW nEndRow, SCTAB nEndTab,
@@ -1009,7 +1015,7 @@ public:
SC_DLLPUBLIC void ResetClip( ScDocument* pSourceDoc, const ScMarkData* pMarks );
SC_DLLPUBLIC void ResetClip( ScDocument* pSourceDoc, SCTAB nTab );
void SetCutMode( BOOL bCut );
- BOOL IsCutMode();
+ SC_DLLPUBLIC BOOL IsCutMode();
void SetClipArea( const ScRange& rArea, BOOL bCut = FALSE );
SC_DLLPUBLIC BOOL IsDocVisible() const { return bIsVisible; }
@@ -1031,6 +1037,9 @@ public:
const ScMarkData* pMarks = NULL, bool bAllTabs = false, bool bKeepScenarioFlags = false,
bool bIncludeObjects = false, bool bCloneNoteCaptions = true);
+ void CopyToClip4VBA(const ScClipParam& rClipParam, ScDocument* pClipDoc, bool bKeepScenarioFlags = false,
+ bool bIncludeObjects = false, bool bCloneNoteCaptions = true);
+
void CopyTabToClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
SCTAB nTab, ScDocument* pClipDoc = NULL);
void CopyBlockFromClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
@@ -1582,6 +1591,7 @@ public:
SC_DLLPUBLIC ScLkUpdMode GetLinkMode() const { return eLinkMode ;}
void SetLinkMode( ScLkUpdMode nSet ) { eLinkMode = nSet;}
+ SC_DLLPUBLIC ScMacroManager* GetMacroManager();
private:
ScDocument(const ScDocument& r); // disabled with no definition
@@ -1845,6 +1855,7 @@ private: // CLOOK-Impl-Methoden
const ScRange& r, SCsCOL nDx, SCsROW nDy, SCsTAB nDz );
void CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClipRange, const ScMarkData* pMarks, bool bAllTabs);
+ void CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClipRange, SCTAB nTab);
void CopyRangeNamesFromClip(ScDocument* pClipDoc, ScClipRangeNameData& rRangeNames);
void UpdateRangeNamesInFormulas(
ScClipRangeNameData& rRangeNames, const ScRangeList& rDestRanges, const ScMarkData& rMark,
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index 293dd0af85fe..63b188496d10 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -225,6 +225,7 @@ const USHORT IDF_HARDATTR = 0x0020; /// Hard cell attributes.
const USHORT IDF_STYLES = 0x0040; /// Cell styles.
const USHORT IDF_OBJECTS = 0x0080; /// Drawing objects.
const USHORT IDF_EDITATTR = 0x0100; /// Rich-text attributes.
+const USHORT IDF_SPECIAL_BOOLEAN = 0x1000;
const USHORT IDF_ATTRIB = IDF_HARDATTR | IDF_STYLES;
const USHORT IDF_CONTENTS = IDF_VALUE | IDF_DATETIME | IDF_STRING | IDF_NOTE | IDF_FORMULA;
const USHORT IDF_ALL = IDF_CONTENTS | IDF_ATTRIB | IDF_OBJECTS;
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 31934067988a..e590cbf6d0e9 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -577,7 +577,23 @@
#define STR_UNDO_SET_TAB_BG_COLOR 438
#define STR_UNDO_SET_MULTI_TAB_BG_COLOR 439
-#define STR_COUNT 440
+#define STR_SHAPE_AUTOSHAPE 440
+#define STR_SHAPE_RECTANGLE 441
+#define STR_SHAPE_LINE 442
+#define STR_SHAPE_OVAL 443
+#define STR_SHAPE_TEXTBOX 444
+
+#define STR_FORM_BUTTON 445
+#define STR_FORM_CHECKBOX 446
+#define STR_FORM_OPTIONBUTTON 447
+#define STR_FORM_LABEL 448
+#define STR_FORM_LISTBOX 449
+#define STR_FORM_GROUPBOX 450
+#define STR_FORM_DROPDOWN 451
+#define STR_FORM_SPINNER 452
+#define STR_FORM_SCROLLBAR 453
+
+#define STR_COUNT 454
#endif
diff --git a/sc/inc/rangenam.hxx b/sc/inc/rangenam.hxx
index 889efcf164d7..37b70554b708 100644
--- a/sc/inc/rangenam.hxx
+++ b/sc/inc/rangenam.hxx
@@ -142,7 +142,7 @@ public:
SC_DLLPUBLIC BOOL IsReference( ScRange& rRef ) const;
BOOL IsReference( ScRange& rRef, const ScAddress& rPos ) const;
- BOOL IsValidReference( ScRange& rRef ) const;
+ SC_DLLPUBLIC BOOL IsValidReference( ScRange& rRef ) const;
BOOL IsRangeAtBlock( const ScRange& ) const;
void UpdateTabRef(SCTAB nOldTable, USHORT nFlag, SCTAB nNewTable);
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 4d4c94d32d04..dfa057d431fb 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -592,11 +592,9 @@
// #i59082# assign macro to shape
#define SID_ASSIGNMACRO (SC_VIEW_START + 95)
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
// #i66550# hyperlinks in shapes
#define SID_DRAW_HLINK_EDIT (SC_VIEW_START + 96)
#define SID_DRAW_HLINK_DELETE (SC_VIEW_START + 97)
-#endif
// "Zoom / Synchronize sheets" in options dialog
#define SID_SC_OPT_SYNCZOOM (SC_VIEW_START + 98)
@@ -1669,6 +1667,11 @@
#define RID_SCPAGE_FORMULA (SC_OOO_BUILD_START + 2)
#define HID_SCPAGE_FORMULA (SC_OOO_BUILD_START + 3)
+// Data Form
+#define SID_DATAFORM_NEW (SC_OOO_BUILD_START + 5) // message
+#define SID_DATA_FORM (SC_OOO_BUILD_START + 6) // menu (in Data menu)
+#define RID_SCDLG_DATAFORM (SC_OOO_BUILD_START + 7) // dialog
+
#endif
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index 442e62bdd9cb..d075785c56d6 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -40,6 +40,8 @@
#include "pivot.hxx"
#include "i18npool/lang.h"
+#include <tabvwsh.hxx>
+
class ScAsciiOptions;
class ScAutoFormat;
class ScAutoFormatData;
@@ -113,6 +115,12 @@ public:
virtual DelCellCmd GetDelCellCmd() const = 0;
};
+//for dataform
+class AbstractScDataFormDlg : public VclAbstractDialog //add for ScDeleteCellDlg
+{
+
+};
+
class AbstractScDeleteContentsDlg: public VclAbstractDialog //add for ScDeleteContentsDlg
{
public:
@@ -309,7 +317,7 @@ public:
class ScAbstractDialogFactory
{
public:
- static ScAbstractDialogFactory* Create();
+ SC_DLLPUBLIC static ScAbstractDialogFactory* Create();
virtual AbstractScImportAsciiDlg * CreateScImportAsciiDlg( Window* pParent, String aDatName, //add for ScImportAsciiDlg
SvStream* pInStream, int nId,
@@ -343,6 +351,9 @@ public:
virtual AbstractScDeleteCellDlg * CreateScDeleteCellDlg( Window* pParent, int nId, BOOL bDisallowCellMove = FALSE ) = 0 ; //add for ScDeleteCellDlg
+ //for dataform
+ virtual AbstractScDataFormDlg * CreateScDataFormDlg( Window* pParent, int nId, ScTabViewShell* pTabViewShell ) = 0 ; //add for ScDataFormDlg
+
virtual AbstractScDeleteContentsDlg * CreateScDeleteContentsDlg(Window* pParent,int nId, //add for ScDeleteContentsDlg
USHORT nCheckDefaults = 0 ) = 0;
virtual AbstractScFillSeriesDlg * CreateScFillSeriesDlg( Window* pParent, //add for ScFillSeriesDlg
diff --git a/sc/inc/scmod.hxx b/sc/inc/scmod.hxx
index bd5d40709cd4..1cbc3065c613 100644
--- a/sc/inc/scmod.hxx
+++ b/sc/inc/scmod.hxx
@@ -201,12 +201,12 @@ public:
// Options:
const ScViewOptions& GetViewOptions ();
- const ScDocOptions& GetDocOptions ();
+SC_DLLPUBLIC const ScDocOptions& GetDocOptions ();
SC_DLLPUBLIC const ScAppOptions& GetAppOptions ();
const ScInputOptions& GetInputOptions ();
SC_DLLPUBLIC const ScPrintOptions& GetPrintOptions ();
void SetViewOptions ( const ScViewOptions& rOpt );
- void SetDocOptions ( const ScDocOptions& rOpt );
+SC_DLLPUBLIC void SetDocOptions ( const ScDocOptions& rOpt );
SC_DLLPUBLIC void SetAppOptions ( const ScAppOptions& rOpt );
void SetInputOptions ( const ScInputOptions& rOpt );
void SetPrintOptions ( const ScPrintOptions& rOpt );
diff --git a/sc/inc/shapeuno.hxx b/sc/inc/shapeuno.hxx
index ddbbf3108daf..880ab42357a5 100644
--- a/sc/inc/shapeuno.hxx
+++ b/sc/inc/shapeuno.hxx
@@ -52,6 +52,7 @@ namespace com { namespace sun { namespace star {
class SdrObject;
struct SvEventDescription;
class ShapeUnoEventAccessImpl;
+class ScMacroInfo;
//------------------------------------------------------------------------
@@ -70,6 +71,7 @@ class ScShapeObj :public ScShapeObj_Base
,public ScShapeObj_TextBase
{
private:
+friend ScMacroInfo* lcl_getShapeHyperMacroInfo( ScShapeObj* pShape, BOOL bCreate );
::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation > mxShapeAgg;
// cached pointers to avoid repeated queryAggregation calls:
::com::sun::star::beans::XPropertySet* pShapePropertySet;
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 757d07a903da..6ea93a69bc9f 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -87,6 +87,8 @@ class ScFlatBoolRowSegments;
class ScFlatBoolColSegments;
struct ScSetStringParam;
+typedef std::hash_map< ::rtl::OUString, rtl::OUString, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > NameToNameMap;
+
class ScTable
{
private:
@@ -181,6 +183,7 @@ private:
Color aTabBgColor;
USHORT nScenarioFlags;
BOOL bActiveScenario;
+ NameToNameMap localNameToGlobalName;
bool mbPageBreaksValid;
friend class ScDocument; // fuer FillInfo
diff --git a/sc/inc/unonames.hxx b/sc/inc/unonames.hxx
index a131c10f779e..acfd5cb19d15 100644
--- a/sc/inc/unonames.hxx
+++ b/sc/inc/unonames.hxx
@@ -184,6 +184,8 @@
#define SC_UNONAME_ANCHOR "Anchor"
#define SC_UNONAME_HORIPOS "HoriOrientPosition"
#define SC_UNONAME_VERTPOS "VertOrientPosition"
+// #i66550 HLINK_FOR_SHAPES
+#define SC_UNONAME_HYPERLINK "Hyperlink"
// other cell properties
#define SC_UNONAME_CHCOLHDR "ChartColumnAsLabel"
@@ -529,6 +531,7 @@
#define SC_UNO_ZOOMTYPE "ZoomType"
#define SC_UNO_ZOOMVALUE "ZoomValue"
#define SC_UNO_UPDTEMPL "UpdateFromTemplate"
+#define SC_UNO_FILTERED_RANGE_SELECTION "FilteredRangeSelection"
/*Stampit enable/disable print cancel */
#define SC_UNO_ALLOWPRINTJOBCANCEL "AllowPrintJobCancel"
@@ -610,6 +613,7 @@
#define SC_UNONAME_ADDRESS "Address"
#define SC_UNONAME_UIREPR "UserInterfaceRepresentation"
#define SC_UNONAME_PERSREPR "PersistentRepresentation"
+#define SC_UNONAME_XL_A1_REPR "XL_A1_Representation"
#define SC_UNONAME_REFSHEET "ReferenceSheet"
// --> PB 2004-08-23 #i33095# Security Options
diff --git a/sc/inc/userdat.hxx b/sc/inc/userdat.hxx
index 88dea98ec22a..f457ca33e22a 100644
--- a/sc/inc/userdat.hxx
+++ b/sc/inc/userdat.hxx
@@ -99,16 +99,12 @@ public:
void SetMacro( const rtl::OUString& rMacro ) { maMacro = rMacro; }
const rtl::OUString& GetMacro() const { return maMacro; }
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
void SetHlink( const rtl::OUString& rHlink ) { maHlink = rHlink; }
const rtl::OUString& GetHlink() const { return maHlink; }
-#endif
private:
rtl::OUString maMacro;
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
rtl::OUString maHlink;
-#endif
};
//-------------------------------------------------------------------------
diff --git a/sc/inc/viewuno.hxx b/sc/inc/viewuno.hxx
index 19b5c60fd070..26c4cf93d817 100644
--- a/sc/inc/viewuno.hxx
+++ b/sc/inc/viewuno.hxx
@@ -199,6 +199,7 @@ private:
XActivationEventListenerArr_Impl aActivationListeners;
SCTAB nPreviousTab;
sal_Bool bDrawSelModeSet;
+ sal_Bool bFilteredRangeSelection;
ScViewPaneObj* GetObjectByIndex_Impl(USHORT nIndex) const;
INT16 GetZoom(void) const;
@@ -313,6 +314,13 @@ public:
::com::sun::star::sheet::XSpreadsheet >& xActiveSheet )
throw(::com::sun::star::uno::RuntimeException);
+ //liuchen 2009-9-2 support expand (but not replace) the active sheet
+ virtual void SAL_CALL selectSheet( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::sheet::XSpreadsheet >& xActiveSheet,
+ sal_Bool bExpand)
+ throw(::com::sun::star::uno::RuntimeException);
+ //liuchen 2009-9-2
+
//XEnhancedMouseClickBroadcaster
virtual void SAL_CALL addEnhancedMouseClickHandler( const ::com::sun::star::uno::Reference<