summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Power <npower@openoffice.org>2009-09-18 15:24:22 +0000
committerNoel Power <npower@openoffice.org>2009-09-18 15:24:22 +0000
commitec2ffaf6f52ac8ce9085d831d0229738cf31e549 (patch)
tree45e503cdb57bf524ce3d8d9722da1cb4da9817d3
parent543b68b3ed9524cf289533a00e2c9e6df9b4651a (diff)
initial commit of code reorg, existing files that are modified
-rw-r--r--basic/inc/basic/basmgr.hxx2
-rw-r--r--basic/inc/basic/sbstar.hxx9
-rw-r--r--basic/source/basmgr/basmgr.cxx10
-rw-r--r--basic/source/classes/sb.cxx42
-rw-r--r--basic/source/classes/sbxmod.cxx34
-rw-r--r--basic/source/runtime/step2.cxx53
-rw-r--r--oovbaapi/genconstidl/makefile.mk6
-rw-r--r--oovbaapi/ooo/vba/XCommandBar.idl3
-rw-r--r--oovbaapi/ooo/vba/XCommandBarControl.idl2
-rw-r--r--oovbaapi/ooo/vba/excel/XApplication.idl14
-rw-r--r--oovbaapi/ooo/vba/excel/XDialog.idl7
-rw-r--r--oovbaapi/ooo/vba/excel/XDialogs.idl11
-rw-r--r--oovbaapi/ooo/vba/excel/XFont.idl13
-rw-r--r--oovbaapi/ooo/vba/excel/XPageSetup.idl9
-rw-r--r--oovbaapi/ooo/vba/excel/XTextFrame.idl14
-rw-r--r--oovbaapi/ooo/vba/excel/XWindow.idl9
-rw-r--r--oovbaapi/ooo/vba/excel/XWorkbook.idl17
-rw-r--r--oovbaapi/ooo/vba/excel/XWorkbooks.idl3
-rw-r--r--oovbaapi/ooo/vba/excel/XWorksheet.idl3
-rw-r--r--oovbaapi/ooo/vba/excel/makefile.mk7
-rw-r--r--oovbaapi/ooo/vba/makefile.mk17
-rw-r--r--oovbaapi/ooo/vba/msforms/XControl.idl1
-rw-r--r--oovbaapi/ooo/vba/msforms/XShape.idl17
-rw-r--r--oovbaapi/ooo/vba/msforms/XShapeRange.idl16
-rw-r--r--oovbaapi/ooo/vba/msforms/XShapes.idl1
-rw-r--r--oovbaapi/ooo/vba/msforms/makefile.mk1
-rw-r--r--oovbaapi/prj/build.lst3
-rw-r--r--oovbaapi/util/makefile.mk1
-rw-r--r--sfx2/inc/sfx2/objsh.hxx2
-rw-r--r--sfx2/source/doc/objcont.cxx50
-rw-r--r--sfx2/source/doc/objserv.cxx16
-rw-r--r--sfx2/source/doc/objxtor.cxx31
-rw-r--r--svx/prj/d.lst1
-rw-r--r--svx/source/msfilter/makefile.mk6
34 files changed, 252 insertions, 179 deletions
diff --git a/basic/inc/basic/basmgr.hxx b/basic/inc/basic/basmgr.hxx
index 3285c09527..7230d2cee1 100644
--- a/basic/inc/basic/basmgr.hxx
+++ b/basic/inc/basic/basmgr.hxx
@@ -231,6 +231,8 @@ public:
::com::sun::star::uno::Any
SetGlobalUNOConstant( const sal_Char* _pAsciiName, const ::com::sun::star::uno::Any& _rValue );
+ /** retrieves a global constant in the basic library, referring to some UNO object, returns true if a value is found ( value is in aOut ) false otherwise. */
+ bool GetGlobalUNOConstant( const sal_Char* _pAsciiName, ::com::sun::star::uno::Any& aOut );
/** determines whether there are password-protected modules whose size exceedes the
legacy module size
@param _out_rModuleNames
diff --git a/basic/inc/basic/sbstar.hxx b/basic/inc/basic/sbstar.hxx
index f71d1ff2fd..0d61e9bad6 100644
--- a/basic/inc/basic/sbstar.hxx
+++ b/basic/inc/basic/sbstar.hxx
@@ -74,6 +74,11 @@ class StarBASIC : public SbxObject
BOOL bDocBasic;
BasicLibInfo* pLibInfo; // Info block for basic manager
SbLanguageMode eLanguageMode; // LanguageMode of the basic object
+ BOOL bQuit;
+
+ SbxObjectRef pVBAGlobals;
+ SbxObject* getVBAGlobals( );
+
protected:
BOOL CError( SbError, const String&, xub_StrLen, xub_StrLen, xub_StrLen );
private:
@@ -196,6 +201,10 @@ public:
SbxObjectRef getRTL( void ) { return pRtl; }
BOOL IsDocBasic() { return bDocBasic; }
+ SbxVariable* VBAFind( const String& rName, SbxClassType t );
+ bool GetUNOConstant( const sal_Char* _pAsciiName, ::com::sun::star::uno::Any& aOut );
+ void QuitAndExitApplication();
+ BOOL IsQuitApplication() { return bQuit; };
};
#ifndef __SB_SBSTARBASICREF_HXX
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 9c690f1c8d..284177b61b 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -47,6 +47,7 @@
#include <basic/sbuno.hxx>
#include <basic/basmgr.hxx>
+#include <sbunoobj.hxx>
#include "basrid.hxx"
#include "sbintern.hxx"
#include <sb.hrc>
@@ -1767,6 +1768,15 @@ BasicError* BasicManager::GetNextError()
DBG_CHKTHIS( BasicManager, 0 );
return pErrorMgr->GetNextError();
}
+bool BasicManager::GetGlobalUNOConstant( const sal_Char* _pAsciiName, ::com::sun::star::uno::Any& aOut )
+{
+ bool bRes = false;
+ StarBASIC* pStandardLib = GetStdLib();
+ OSL_PRECOND( pStandardLib, "BasicManager::SetGlobalUNOConstant: no lib to insert into!" );
+ if ( pStandardLib )
+ bRes = pStandardLib->GetUNOConstant( _pAsciiName, aOut );
+ return bRes;
+}
Any BasicManager::SetGlobalUNOConstant( const sal_Char* _pAsciiName, const Any& _rValue )
{
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 4f123c2e23..be70bb7b57 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -65,7 +65,29 @@ SV_IMPL_VARARR(SbTextPortions,SbTextPortion)
TYPEINIT1(StarBASIC,SbxObject)
#define RTLNAME "@SBRTL"
+// i#i68894#
+const static String aThisComponent( RTL_CONSTASCII_USTRINGPARAM("ThisComponent") );
+const static String aVBAHook( RTL_CONSTASCII_USTRINGPARAM( "VBAGlobals" ) );
+
+SbxObject* StarBASIC::getVBAGlobals( )
+{
+ if ( !pVBAGlobals )
+ pVBAGlobals = (SbUnoObject*)Find( aVBAHook , SbxCLASS_DONTCARE );
+ return pVBAGlobals;
+}
+
+// i#i68894#
+SbxVariable* StarBASIC::VBAFind( const String& rName, SbxClassType t )
+{
+ if( rName == aThisComponent )
+ return NULL;
+ // rename to init globals
+ if ( getVBAGlobals( ) )
+ return pVBAGlobals->Find( rName, t );
+ return NULL;
+
+}
// Create array for conversion SFX <-> VB error code
struct SFX_VB_ErrorItem
{
@@ -654,6 +676,8 @@ StarBASIC::StarBASIC( StarBASIC* p, BOOL bIsDocBasic )
pRtl = new SbiStdObject( String( RTL_CONSTASCII_USTRINGPARAM(RTLNAME) ), this );
// Search via StarBasic is always global
SetFlag( SBX_GBLSEARCH );
+ pVBAGlobals = NULL;
+ bQuit = FALSE;
}
// #51727 Override SetModified so that the modified state
@@ -968,6 +992,12 @@ SbxVariable* StarBASIC::FindVarInCurrentScopy
return pVar;
}
+void StarBASIC::QuitAndExitApplication()
+{
+ Stop();
+ bQuit = TRUE;
+}
+
void StarBASIC::Stop()
{
SbiInstance* p = pINST;
@@ -1506,6 +1536,18 @@ BOOL StarBASIC::LoadOldModules( SvStream& )
return FALSE;
}
+bool StarBASIC::GetUNOConstant( const sal_Char* _pAsciiName, ::com::sun::star::uno::Any& aOut )
+{
+ bool bRes = false;
+ ::rtl::OUString sVarName( ::rtl::OUString::createFromAscii( _pAsciiName ) );
+ SbUnoObject* pGlobs = dynamic_cast<SbUnoObject*>( Find( sVarName, SbxCLASS_DONTCARE ) );
+ if ( pGlobs )
+ {
+ aOut = pGlobs->getUnoAny();
+ bRes = true;
+ }
+ return bRes;
+}
//========================================================================
// #118116 Implementation Collection object
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 21b31020f9..f00b9ad1a2 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -69,6 +69,11 @@
#endif
#include <stdio.h>
+#include <com/sun/star/frame/XDesktop.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <comphelper/processfactory.hxx>
+#include <vcl/svapp.hxx>
+ using namespace ::com::sun::star;
TYPEINIT1(SbModule,SbxObject)
@@ -84,6 +89,35 @@ SV_IMPL_VARARR(SbiBreakpoints,USHORT)
SV_IMPL_VARARR(HighlightPortions, HighlightPortion)
+class AsyncQuitHandler
+{
+ AsyncQuitHandler() {}
+ AsyncQuitHandler( const AsyncQuitHandler&);
+public:
+ static AsyncQuitHandler& instance()
+ {
+ static AsyncQuitHandler dInst;
+ return dInst;
+ }
+
+ void QuitApplication()
+ {
+ uno::Reference< lang::XMultiServiceFactory > xFactory = comphelper::getProcessServiceFactory();
+ if ( xFactory.is() )
+ {
+ uno::Reference< frame::XDesktop > xDeskTop( xFactory->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop") ) ), uno::UNO_QUERY );
+ if ( xDeskTop.is() )
+ xDeskTop->terminate();
+ }
+ }
+ DECL_LINK( OnAsyncQuit, void* );
+};
+
+IMPL_LINK( AsyncQuitHandler, OnAsyncQuit, void*, pNull )
+{
+ QuitApplication();
+ return 0L;
+}
/////////////////////////////////////////////////////////////////////////////
diff --git a/basic/source/runtime/step2.cxx b/basic/source/runtime/step2.cxx
index 2589207ac9..dbc8712063 100644
--- a/basic/source/runtime/step2.cxx
+++ b/basic/source/runtime/step2.cxx
@@ -56,57 +56,6 @@ using com::sun::star::uno::Reference;
SbxVariable* getVBAConstant( const String& rName );
-const static String aThisComponent( RTL_CONSTASCII_USTRINGPARAM("ThisComponent") );
-const static String aVBAHook( RTL_CONSTASCII_USTRINGPARAM( "VBAGlobals" ) );
-// i#i68894#
-SbxArray* getVBAGlobals( )
-{
- static SbxArrayRef pArray;
- static bool isInitialised = false;
- if ( isInitialised )
- return pArray;
- Reference < XComponentContext > xCtx;
- Reference < XPropertySet > xProps(
- ::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW );
- xCtx.set( xProps->getPropertyValue( rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))),
- UNO_QUERY_THROW );
- SbUnoObject dGlobs( String( RTL_CONSTASCII_USTRINGPARAM("ExcelGlobals") ), xCtx->getValueByName( ::rtl::OUString::createFromAscii( "/singletons/ooo.vba.theGlobals") ) );
-
- SbxVariable *vba = dGlobs.Find( String( RTL_CONSTASCII_USTRINGPARAM("getGlobals") ) , SbxCLASS_DONTCARE );
-
- if ( vba )
- {
- pArray = static_cast<SbxArray *>(vba->GetObject());
- isInitialised = true;
- return pArray;
- }
- return NULL;
-}
-
-// i#i68894#
-SbxVariable* VBAFind( const String& rName, SbxClassType t )
-{
- if( rName == aThisComponent )
- return NULL;
-
- SbxArray *pVBAGlobals = getVBAGlobals( );
- for (USHORT i = 0; pVBAGlobals && i < pVBAGlobals->Count(); i++)
- {
- SbxVariable *pElem = pVBAGlobals->Get( i );
- if (!pElem || !pElem->IsObject())
- continue;
- SbxObject *pVba = static_cast<SbxObject *>(pElem->GetObject());
- SbxVariable *pVbaVar = pVba ? pVba->Find( rName, t ) : NULL;
- if( pVbaVar )
- {
- return pVbaVar;
- }
- }
- return NULL;
-
-}
-
// Suchen eines Elements
// Die Bits im String-ID:
// 0x8000 - Argv ist belegt
@@ -191,7 +140,7 @@ SbxVariable* SbiRuntime::FindElement
if ( bVBAEnabled )
{
// Try Find in VBA symbols space
- pElem = VBAFind( aName, SbxCLASS_DONTCARE );
+ pElem = rBasic.VBAFind( aName, SbxCLASS_DONTCARE );
if ( pElem )
bSetName = false; // don't overwrite uno name
else
diff --git a/oovbaapi/genconstidl/makefile.mk b/oovbaapi/genconstidl/makefile.mk
index 42219545c6..95397442c2 100644
--- a/oovbaapi/genconstidl/makefile.mk
+++ b/oovbaapi/genconstidl/makefile.mk
@@ -54,18 +54,16 @@ MYDONEFILES += $(foreach,i,$(MYSYMFILES) $(MISC)$/$(i:b).done)
ALLTAR: GENIDL
-GENIDL : $(MY_GEN_IDL_PATH) $(MYDONEFILES)
+GENIDL : $(MYDONEFILES)
GENRDB : GENIDL $(MYURDFILES)
$(MISC)$/%.done : %.api
+ @@-$(MKDIR) $(MY_GEN_IDL_PATH)
@echo Processing $?
$(PERL) api-to-idl.pl $? $(MY_GEN_IDL_PATH)
@$(TOUCH) $@
-$(MY_GEN_IDL_PATH) :
- @@-$(MKDIR) $@
-
CLEAN :
@$(RM) $(MY_GEN_IDL_PATH)$/*.idl
@$(RM) $(foreach,i,$(MYSYMFILES) $(MISC)$/$(i:b).done)
diff --git a/oovbaapi/ooo/vba/XCommandBar.idl b/oovbaapi/ooo/vba/XCommandBar.idl
index 59fa285ae1..e0b178181d 100644
--- a/oovbaapi/ooo/vba/XCommandBar.idl
+++ b/oovbaapi/ooo/vba/XCommandBar.idl
@@ -54,9 +54,12 @@ interface XCommandBar
[attribute] string Name;
[attribute] boolean Visible;
+ [attribute] boolean Enabled;
void Delete() raises ( com::sun::star::script::BasicErrorException );
any Controls( [in] any Index ) raises ( com::sun::star::script::BasicErrorException );
+ long Type() raises ( com::sun::star::script::BasicErrorException );
+ any FindControl( [in] any Type, [in] any Id, [in] any Tag, [in] any Visible, [in] any Recursive ) raises ( com::sun::star::script::BasicErrorException );
};
}; };
diff --git a/oovbaapi/ooo/vba/XCommandBarControl.idl b/oovbaapi/ooo/vba/XCommandBarControl.idl
index 02cf8bafc8..c40394e29d 100644
--- a/oovbaapi/ooo/vba/XCommandBarControl.idl
+++ b/oovbaapi/ooo/vba/XCommandBarControl.idl
@@ -54,6 +54,8 @@ interface XCommandBarControl
[attribute] string Caption;
[attribute] string OnAction;
[attribute] boolean Visible;
+ [attribute, readonly] long Type;
+ [attribute] boolean Enabled;
void Delete() raises ( com::sun::star::script::BasicErrorException );
any Controls( [in] any Index ) raises ( com::sun::star::script::BasicErrorException );
diff --git a/oovbaapi/ooo/vba/excel/XApplication.idl b/oovbaapi/ooo/vba/excel/XApplication.idl
index be0cf98087..ec7c119047 100644
--- a/oovbaapi/ooo/vba/excel/XApplication.idl
+++ b/oovbaapi/ooo/vba/excel/XApplication.idl
@@ -42,10 +42,6 @@
#include <ooo/vba/XAssistant.idl>
#endif
-#ifndef __ooo_vba_XCommandBars_idl__
-#include <ooo/vba/XCommandBars.idl>
-#endif
-
module ooo { module vba { module excel {
interface XRange;
@@ -56,10 +52,10 @@ interface XWorksheetFunction;
interface XWindow;
interface XWorksheet;
-interface XApplication
+interface XApplication : com::sun::star::uno::XInterface
{
- interface ::ooo::vba::XHelperInterface;
+// interface ::ooo::vba::XHelperInterface;
[attribute, readonly] any Selection;
[attribute, readonly] XWorkbook ActiveWorkbook;
@@ -74,14 +70,11 @@ interface XApplication
// to determine this
[attribute, readonly] XWorkbook ThisWorkbook;
[attribute, readonly] string Name;
- [attribute] boolean ScreenUpdating;
- [attribute] boolean DisplayStatusBar;
[attribute] boolean DisplayAlerts;
[attribute] boolean DisplayFormulaBar;
[attribute] any CutCopyMode;
[attribute] any StatusBar;
[attribute] long Cursor;
- [attribute, readonly] string Version;
void setDefaultFilePath([in] string DefaultFilePath) raises(com::sun::star::script::BasicErrorException);
@@ -90,7 +83,7 @@ interface XApplication
string LibraryPath() raises(com::sun::star::script::BasicErrorException);
string TemplatesPath() raises(com::sun::star::script::BasicErrorException);
string PathSeparator() raises(com::sun::star::script::BasicErrorException);
- any CommandBars( [in] any aIndex );
+ //any CommandBars( [in] any aIndex );
any Workbooks( [in] any aIndex );
any Worksheets( [in] any aIndex );
any Windows( [in] any aIndex );
@@ -110,6 +103,7 @@ interface XApplication
raises(com::sun::star::script::BasicErrorException);
void Volatile([in] any Volatile);
void DoEvents();
+ any Caller( [in] any aIndex );
};
}; }; };
diff --git a/oovbaapi/ooo/vba/excel/XDialog.idl b/oovbaapi/ooo/vba/excel/XDialog.idl
index 1aec6eaab5..c9900f432e 100644
--- a/oovbaapi/ooo/vba/excel/XDialog.idl
+++ b/oovbaapi/ooo/vba/excel/XDialog.idl
@@ -45,13 +45,8 @@ module ooo { module vba { module excel {
//=============================================================================
-interface XApplication;
-
-interface XDialog
+interface XDialog : com::sun::star::uno::XInterface
{
- interface ::ooo::vba::XHelperInterface;
-
- void Show();
};
}; }; };
diff --git a/oovbaapi/ooo/vba/excel/XDialogs.idl b/oovbaapi/ooo/vba/excel/XDialogs.idl
index f6ce44ed35..9daa8308cc 100644
--- a/oovbaapi/ooo/vba/excel/XDialogs.idl
+++ b/oovbaapi/ooo/vba/excel/XDialogs.idl
@@ -33,9 +33,6 @@
#ifndef __com_sun_star_uno_XInterface_idl__
#include <com/sun/star/uno/XInterface.idl>
#endif
-#ifndef __ooo_vba_XCollection_idl__
-#include <ooo/vba/XCollection.idl>
-#endif
#ifndef __ooo_vba_XHelperInterface_idl__
#include <ooo/vba/XHelperInterface.idl>
@@ -44,15 +41,9 @@
//=============================================================================
module ooo { module vba { module excel {
-interface XApplication;
-//=============================================================================
-//interface XDialogs : ::ooo::vba::XCollection
-interface XDialogs
+interface XDialogs : com::sun::star::uno::XInterface
{
- interface ::ooo::vba::XHelperInterface;
-
- [attribute, readonly] long Count;
any Item( [in] any Index );
};
diff --git a/oovbaapi/ooo/vba/excel/XFont.idl b/oovbaapi/ooo/vba/excel/XFont.idl
index 3a96e58033..b3fc95b548 100644
--- a/oovbaapi/ooo/vba/excel/XFont.idl
+++ b/oovbaapi/ooo/vba/excel/XFont.idl
@@ -47,22 +47,9 @@ module ooo { module vba { module excel {
interface XFont
{
- interface ::ooo::vba::XHelperInterface;
-
- [attribute] any Size;
[attribute] any StandardFontSize;
[attribute] any StandardFont;
[attribute] any FontStyle;
- [attribute] any ColorIndex;
- [attribute] any Color;
- [attribute] any Bold;
- [attribute] any Underline;
- [attribute] any Strikethrough;
- [attribute] any Shadow;
- [attribute] any Italic;
- [attribute] any Subscript;
- [attribute] any Superscript;
- [attribute] any Name;
[attribute] any OutlineFont;
};
diff --git a/oovbaapi/ooo/vba/excel/XPageSetup.idl b/oovbaapi/ooo/vba/excel/XPageSetup.idl
index 03ed927338..6a0832856f 100644
--- a/oovbaapi/ooo/vba/excel/XPageSetup.idl
+++ b/oovbaapi/ooo/vba/excel/XPageSetup.idl
@@ -45,20 +45,15 @@ module ooo { module vba { module excel {
//=============================================================================
-interface XPageSetup
+interface XPageSetup : com::sun::star::uno::XInterface
{
- interface ::ooo::vba::XHelperInterface;
+// interface ::ooo::vba::XHelperInterface;
//Attributes
[attribute] string PrintArea;
- [attribute] double TopMargin;
- [attribute] double BottomMargin;
- [attribute] double RightMargin;
- [attribute] double LeftMargin;
[attribute] double HeaderMargin;
[attribute] double FooterMargin;
- [attribute] long Orientation;
[attribute] any FitToPagesTall;
[attribute] any FitToPagesWide;
[attribute] any Zoom;
diff --git a/oovbaapi/ooo/vba/excel/XTextFrame.idl b/oovbaapi/ooo/vba/excel/XTextFrame.idl
index 534b2561ea..4962be54d2 100644
--- a/oovbaapi/ooo/vba/excel/XTextFrame.idl
+++ b/oovbaapi/ooo/vba/excel/XTextFrame.idl
@@ -34,21 +34,9 @@
#include <ooo/vba/XHelperInterface.idl>
#endif
-#ifndef __ooo_vba_excel_XCharacters_idl__
-#include <ooo/vba/excel/XCharacters.idl>
-#endif
-
module ooo { module vba { module excel {
-interface XTextFrame : ooo::vba::XHelperInterface
+interface XTextFrame : com::sun::star::uno::XInterface
{
- [attribute] boolean AutoSize;
- [attribute] float MarginBottom;
- [attribute] float MarginTop;
- [attribute] float MarginLeft;
- [attribute] float MarginRight;
- XCharacters Characters();
- /*I don't find it in msdn
- Range TextRange();*/
};
}; }; };
#endif
diff --git a/oovbaapi/ooo/vba/excel/XWindow.idl b/oovbaapi/ooo/vba/excel/XWindow.idl
index 2baf8995ab..89fee31b85 100644
--- a/oovbaapi/ooo/vba/excel/XWindow.idl
+++ b/oovbaapi/ooo/vba/excel/XWindow.idl
@@ -46,10 +46,8 @@ module ooo { module vba { module excel {
interface XRange;
interface XWorksheet;
interface XPane;
-interface XWindow
+interface XWindow : com::sun::star::uno::XInterface
{
- interface ::ooo::vba::XHelperInterface;
-
[attribute] any Caption;
[attribute] boolean DisplayGridlines;
[attribute] boolean DisplayHeadings;
@@ -58,8 +56,6 @@ interface XWindow
[attribute] boolean DisplayVerticalScrollBar;
[attribute] boolean DisplayWorkbookTabs;
[attribute] boolean FreezePanes;
- [attribute] long Height;
- [attribute] long Left;
[attribute] boolean Split;
[attribute] long SplitColumn;
[attribute] double SplitHorizontal;
@@ -67,10 +63,7 @@ interface XWindow
[attribute] double SplitVertical;
[attribute] any ScrollColumn;
[attribute] any ScrollRow;
- [attribute] long Top;
[attribute] any View;
- [attribute] boolean Visible;
- [attribute] long Width;
[attribute] any WindowState;
[attribute] any Zoom;
any SelectedSheets( [in] any aIndex );
diff --git a/oovbaapi/ooo/vba/excel/XWorkbook.idl b/oovbaapi/ooo/vba/excel/XWorkbook.idl
index d4d9167d78..99b55f4a3c 100644
--- a/oovbaapi/ooo/vba/excel/XWorkbook.idl
+++ b/oovbaapi/ooo/vba/excel/XWorkbook.idl
@@ -48,31 +48,20 @@ interface XWorksheet;
interface XWorksheets;
interface XStyles;
-interface XWorkbook
+interface XWorkbook : com::sun::star::uno::XInterface
{
- interface ::ooo::vba::XHelperInterface;
-
- [attribute, readonly] string Name;
- [attribute, readonly] string Path;
- [attribute, readonly] string FullName;
[attribute, readonly] boolean ProtectStructure;
[attribute, readonly] XWorksheet ActiveSheet;
- [attribute] boolean Saved;
[attribute, readonly] string CodeName;
+ [attribute] boolean PrecisionAsDisplayed;
any Worksheets([in] any sheet);
any Styles([in] any Index );
any Sheets([in] any sheet);
any Windows([in] any index );
- void Close([in] any SaveChanges, [in] any FileName, [in] any RouteWorkBook);
- void Protect( [in] any Password );
- void Unprotect( [in] any Password );
- void Save();
- void Activate();
void ResetColors() raises (com::sun::star::script::BasicErrorException);
-
+ void Activate();
any Names( [in] any Index );
-
any Colors([in] any Index) raises (com::sun::star::script::BasicErrorException);
long FileFormat() raises (com::sun::star::script::BasicErrorException);
void SaveCopyAs( [in] string Filename );
diff --git a/oovbaapi/ooo/vba/excel/XWorkbooks.idl b/oovbaapi/ooo/vba/excel/XWorkbooks.idl
index 955e553f15..fb6a40b1f6 100644
--- a/oovbaapi/ooo/vba/excel/XWorkbooks.idl
+++ b/oovbaapi/ooo/vba/excel/XWorkbooks.idl
@@ -45,9 +45,8 @@ module ooo { module vba { module excel {
//=============================================================================
-interface XWorkbooks
+interface XWorkbooks : com::sun::star::uno::XInterface
{
- interface ::ooo::vba::XCollection;
any Add();
any Open([in] string Filename, [in] any UpdateLinks, [in] any ReadOnly, [in] any Format, [in] any Password, [in] any WriteResPassword, [in] any IgnoreReadOnlyRecommended, [in] any Origin, [in] any Delimiter, [in] any Editable, [in] any Notify, [in] any Converter, [in] any AddToMru);
diff --git a/oovbaapi/ooo/vba/excel/XWorksheet.idl b/oovbaapi/ooo/vba/excel/XWorksheet.idl
index 7a00aeaf2b..905239b48d 100644
--- a/oovbaapi/ooo/vba/excel/XWorksheet.idl
+++ b/oovbaapi/ooo/vba/excel/XWorksheet.idl
@@ -53,6 +53,7 @@ interface XRange;
interface XOutline;
interface XPageSetup;
interface XHPageBreaks;
+interface XVPageBreaks;
interface XWorksheet
{
interface ::ooo::vba::XHelperInterface;
@@ -70,6 +71,7 @@ interface XWorksheet
[attribute, readonly] XWorksheet Previous;
[attribute, readonly] string CodeName;
[attribute, readonly] short Index;
+ [attribute] long EnableSelection;
void Activate();
void Calculate( );
@@ -88,6 +90,7 @@ interface XWorksheet
XOutline Outline();
XPageSetup PageSetup();
any HPageBreaks([in] any Index);
+ any VPageBreaks([in] any Index);
any OLEObjects([in] any Index);
void ShowDataForm();
any Shapes([in] any Index);
diff --git a/oovbaapi/ooo/vba/excel/makefile.mk b/oovbaapi/ooo/vba/excel/makefile.mk
index 764c073e68..4ffa89f94c 100644
--- a/oovbaapi/ooo/vba/excel/makefile.mk
+++ b/oovbaapi/ooo/vba/excel/makefile.mk
@@ -46,7 +46,9 @@ dummy:
# ------------------------------------------------------------------------
-IDLFILES= XApplication.idl\
+IDLFILES= XGlobals.idl\
+ Globals.idl\
+ XApplication.idl\
XComment.idl\
XComments.idl\
XRange.idl\
@@ -103,6 +105,9 @@ IDLFILES= XApplication.idl\
XPageBreak.idl \
XHPageBreak.idl \
XHPageBreaks.idl \
+ XVPageBreak.idl \
+ XVPageBreaks.idl \
+ TextFrame.idl \
# ------------------------------------------------------------------
diff --git a/oovbaapi/ooo/vba/makefile.mk b/oovbaapi/ooo/vba/makefile.mk
index ee63d6373f..093ea81d8d 100644
--- a/oovbaapi/ooo/vba/makefile.mk
+++ b/oovbaapi/ooo/vba/makefile.mk
@@ -47,7 +47,6 @@ dummy:
IDLFILES=\
XErrObject.idl \
- XGlobals.idl \
XCollection.idl\
XVBAToOOEventDescGen.idl\
XPropValue.idl\
@@ -57,7 +56,21 @@ IDLFILES=\
XCommandBarControls.idl\
XCommandBar.idl\
XCommandBars.idl\
- Globals.idl\
+ XCommandBarPopup.idl\
+ XCommandBarButton.idl\
+ XControlProvider.idl\
+ ControlProvider.idl\
+ XApplicationBase.idl\
+ XWindowBase.idl\
+ XDocumentBase.idl\
+ XDocumentsBase.idl\
+ XGlobalsBase.idl\
+ XDocumentProperty.idl\
+ XDocumentProperties.idl\
+ XFontBase.idl\
+ XDialogsBase.idl\
+ XDialogBase.idl\
+ XPageSetupBase.idl \
# ------------------------------------------------------------------
diff --git a/oovbaapi/ooo/vba/msforms/XControl.idl b/oovbaapi/ooo/vba/msforms/XControl.idl
index 30901fb729..cef5ff25bd 100644
--- a/oovbaapi/ooo/vba/msforms/XControl.idl
+++ b/oovbaapi/ooo/vba/msforms/XControl.idl
@@ -61,6 +61,7 @@ interface XControl
[attribute] double Left;
[attribute] double Top;
[attribute] string Name;
+ [attribute] string ControlTipText;
};
//=============================================================================
diff --git a/oovbaapi/ooo/vba/msforms/XShape.idl b/oovbaapi/ooo/vba/msforms/XShape.idl
index a1ac36dd27..90047e642b 100644
--- a/oovbaapi/ooo/vba/msforms/XShape.idl
+++ b/oovbaapi/ooo/vba/msforms/XShape.idl
@@ -34,10 +34,6 @@
#include <ooo/vba/XHelperInterface.idl>
#endif
-#ifndef __ooo_vba_excel_XTextFrame_idl__
-#include <ooo/vba/excel/XTextFrame.idl>
-#endif
-
#ifndef __ooo_vba_msforms_XLineFormat_idl__
#include <ooo/vba/msforms/XLineFormat.idl>
#endif
@@ -66,14 +62,13 @@ interface XShape : ooo::vba::XHelperInterface
[attribute, readonly] XLineFormat Line;
[attribute, readonly] XFillFormat Fill;
[attribute, readonly] XPictureFormat PictureFormat;
+ [attribute] boolean LockAspectRatio;
+ [attribute] boolean LockAnchor;
+ [attribute] long RelativeHorizontalPosition;
+ [attribute] long RelativeVerticalPosition;
- /*
- using in word
- [attribute] RelativeHorizontalPosition
- [attribute] RelativeVerticalPosition
- [attribute] XWrapFormat WrapFormat;
- */
- ooo::vba::excel::XTextFrame TextFrame();
+ any TextFrame();
+ any WrapFormat();
void Delete();
void ZOrder( [in] long ZOrderCmd );
void IncrementRotation( [in] double Increment );
diff --git a/oovbaapi/ooo/vba/msforms/XShapeRange.idl b/oovbaapi/ooo/vba/msforms/XShapeRange.idl
index 1b39485dfd..0ae1883d26 100644
--- a/oovbaapi/ooo/vba/msforms/XShapeRange.idl
+++ b/oovbaapi/ooo/vba/msforms/XShapeRange.idl
@@ -44,9 +44,25 @@
module ooo { module vba { module msforms {
+interface XLineFormat;
+interface XFillFormat;
interface XShapeRange
{
interface ooo::vba::XCollection;
+
+ [attribute] double Height;
+ [attribute] double Width;
+ [attribute] double Left;
+ [attribute] double Top;
+ [attribute, readonly] XLineFormat Line;
+ [attribute, readonly] XFillFormat Fill;
+ [attribute] boolean LockAspectRatio;
+ [attribute] boolean LockAnchor;
+ [attribute] long RelativeHorizontalPosition;
+ [attribute] long RelativeVerticalPosition;
+
+ any TextFrame();
+ any WrapFormat();
void Select();
XShape Group();
void IncrementRotation( [in] double Increment );
diff --git a/oovbaapi/ooo/vba/msforms/XShapes.idl b/oovbaapi/ooo/vba/msforms/XShapes.idl
index 3ba31ab8a6..7d7e26d422 100644
--- a/oovbaapi/ooo/vba/msforms/XShapes.idl
+++ b/oovbaapi/ooo/vba/msforms/XShapes.idl
@@ -51,6 +51,7 @@ interface XShapes
*/
any AddLine( [in] long StartX, [in] long StartY, [in] long endX, [in] long endY );
any AddShape([in] long ShapeType, [in] long StartX, [in] long StartY, [in] long endX, [in] long endY );
+ any AddTextbox([in] long Orientation, [in] long Left, [in] long Top, [in] long Width, [in] long Height );
};
}; }; };
diff --git a/oovbaapi/ooo/vba/msforms/makefile.mk b/oovbaapi/ooo/vba/msforms/makefile.mk
index f654993144..012cc7b91a 100644
--- a/oovbaapi/ooo/vba/msforms/makefile.mk
+++ b/oovbaapi/ooo/vba/msforms/makefile.mk
@@ -71,6 +71,7 @@ IDLFILES=\
XSpinButton.idl \
XImage.idl \
XControls.idl \
+ XTextFrame.idl \
# ------------------------------------------------------------------
diff --git a/oovbaapi/prj/build.lst b/oovbaapi/prj/build.lst
index bc34a4f376..e6d23a3bed 100644
--- a/oovbaapi/prj/build.lst
+++ b/oovbaapi/prj/build.lst
@@ -4,5 +4,6 @@ ovba oovbaapi\genconstidl nmake - all ovba_genconstidl NULL
ovba oovbaapi\ooo\vba\constants nmake - all ovba_constants ovba_genconstidl NULL
ovba oovbaapi\ooo\vba nmake - all ovba_vba NULL
ovba oovbaapi\ooo\vba\excel nmake - all ovba_excel NULL
+ovba oovbaapi\ooo\vba\word nmake - all ovba_word NULL
ovba oovbaapi\ooo\vba\msforms nmake - all ovba_msforms NULL
-ovba oovbaapi\util nmake - all ovba_util ovba_vba ovba_excel ovba_msforms ovba_constants ovba_genconstidl NULL
+ovba oovbaapi\util nmake - all ovba_util ovba_vba ovba_excel ovba_word ovba_msforms ovba_constants ovba_genconstidl NULL
diff --git a/oovbaapi/util/makefile.mk b/oovbaapi/util/makefile.mk
index 97e592a7c0..df7a331540 100644
--- a/oovbaapi/util/makefile.mk
+++ b/oovbaapi/util/makefile.mk
@@ -49,6 +49,7 @@ dummy:
UNOIDLDBFILES= \
$(UCR)$/vba.db \
$(UCR)$/excel.db \
+ $(UCR)$/word.db \
$(UCR)$/msforms.db \
$(UCR)$/constants.db
diff --git a/sfx2/inc/sfx2/objsh.hxx b/sfx2/inc/sfx2/objsh.hxx
index 3c2c0f2d7e..20a07586e1 100644
--- a/sfx2/inc/sfx2/objsh.hxx
+++ b/sfx2/inc/sfx2/objsh.hxx
@@ -264,6 +264,7 @@ public:
TYPEINFO();
SFX_DECL_INTERFACE(SFX_INTERFACE_SFXDOCSH)
+ static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
/* Stampit disable/enable cancel button for print jobs
default = true = enable! */
void Stamp_SetPrintCancelState(sal_Bool bState);
@@ -882,6 +883,7 @@ public:
virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
SfxObjectShell* GetObjectShell() const
{ return pObjSh; }
+
};
#endif
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index 15c883b421..9a9f74a38f 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -1471,31 +1471,35 @@ sal_Bool SfxObjectShell::IsHelpDocument() const
void SfxObjectShell::ResetFromTemplate( const String& rTemplateName, const String& rFileName )
{
- uno::Reference<document::XDocumentProperties> xDocProps(getDocProperties());
- xDocProps->setTemplateURL( ::rtl::OUString() );
- xDocProps->setTemplateName( ::rtl::OUString() );
- xDocProps->setTemplateDate( util::DateTime() );
- xDocProps->resetUserData( ::rtl::OUString() );
-
- // TODO/REFACTOR:
- // Title?
-
- if( ::utl::LocalFileHelper::IsLocalFile( rFileName ) )
+ // only care about reseting this data for openoffice formats otherwise
+ if ( IsOwnStorageFormat_Impl( *GetMedium()) )
{
- String aFoundName;
- if( SFX_APP()->Get_Impl()->GetDocumentTemplates()->GetFull( String(), rTemplateName, aFoundName ) )
+ uno::Reference<document::XDocumentProperties> xDocProps(getDocProperties());
+ xDocProps->setTemplateURL( ::rtl::OUString() );
+ xDocProps->setTemplateName( ::rtl::OUString() );
+ xDocProps->setTemplateDate( util::DateTime() );
+ xDocProps->resetUserData( ::rtl::OUString() );
+
+ // TODO/REFACTOR:
+ // Title?
+
+ if( ::utl::LocalFileHelper::IsLocalFile( rFileName ) )
{
- INetURLObject aObj( rFileName );
- xDocProps->setTemplateURL( aObj.GetMainURL(INetURLObject::DECODE_TO_IURI) );
- xDocProps->setTemplateName( rTemplateName );
-
- ::DateTime now;
- xDocProps->setTemplateDate( util::DateTime(
- now.Get100Sec(), now.GetSec(), now.GetMin(),
- now.GetHour(), now.GetDay(), now.GetMonth(),
- now.GetYear() ) );
-
- SetQueryLoadTemplate( sal_True );
+ String aFoundName;
+ if( SFX_APP()->Get_Impl()->GetDocumentTemplates()->GetFull( String(), rTemplateName, aFoundName ) )
+ {
+ INetURLObject aObj( rFileName );
+ xDocProps->setTemplateURL( aObj.GetMainURL(INetURLObject::DECODE_TO_IURI) );
+ xDocProps->setTemplateName( rTemplateName );
+
+ ::DateTime now;
+ xDocProps->setTemplateDate( util::DateTime(
+ now.Get100Sec(), now.GetSec(), now.GetMin(),
+ now.GetHour(), now.GetDay(), now.GetMonth(),
+ now.GetYear() ) );
+
+ SetQueryLoadTemplate( sal_True );
+ }
}
}
}
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 69c130c173..efaec8335b 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -1475,3 +1475,19 @@ void SfxObjectShell::SignScriptingContent()
ImplSign( TRUE );
}
+// static
+const uno::Sequence<sal_Int8>& SfxObjectShell::getUnoTunnelId()
+{
+ static uno::Sequence<sal_Int8> * pSeq = 0;
+ if( !pSeq )
+ {
+ osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
+ if( !pSeq )
+ {
+ static uno::Sequence< sal_Int8 > aSeq( 16 );
+ rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True );
+ pSeq = &aSeq;
+ }
+ }
+ return *pSeq;
+}
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 569c22cef8..00afecb52c 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -136,6 +136,33 @@ DBG_NAME(SfxObjectShell)
extern svtools::AsynchronLink* pPendingCloser;
static WeakReference< XInterface > s_xCurrentComponent;
+void lcl_UpdateAppBasicDocVars( const Reference< XInterface >& _rxComponent, bool bClear = false )
+{
+ BasicManager* pAppMgr = SFX_APP()->GetBasicManager();
+ if ( pAppMgr )
+ {
+ uno::Reference< beans::XPropertySet > xProps( _rxComponent, uno::UNO_QUERY );
+ if ( xProps.is() )
+ {
+ try
+ {
+ beans::PropertyValue aProp;
+ xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ThisVBADocObj") ) ) >>= aProp;
+ rtl::OString sTmp( rtl::OUStringToOString( aProp.Name, RTL_TEXTENCODING_UTF8 ) );
+ const char* pAscii = sTmp.getStr();
+ if ( bClear )
+ pAppMgr->SetGlobalUNOConstant( pAscii, uno::makeAny( uno::Reference< uno::XInterface >() ) );
+ else
+ pAppMgr->SetGlobalUNOConstant( pAscii, aProp.Value );
+
+ }
+ catch( uno::Exception& e )
+ {
+ }
+ }
+ }
+}
+
//=========================================================================
@@ -170,6 +197,7 @@ void SAL_CALL SfxModelListener_Impl::disposing( const com::sun::star::lang::Even
::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
if ( SfxObjectShell::GetCurrentComponent() == _rEvent.Source )
{
+ lcl_UpdateAppBasicDocVars( SfxObjectShell::GetCurrentComponent(), true );
// remove ThisComponent reference from AppBasic
SfxObjectShell::SetCurrentComponent( Reference< XInterface >() );
}
@@ -1048,7 +1076,10 @@ void SfxObjectShell::SetCurrentComponent( const Reference< XInterface >& _rxComp
BasicManager* pAppMgr = SFX_APP()->GetBasicManager();
s_xCurrentComponent = _rxComponent;
if ( pAppMgr )
+ {
+ lcl_UpdateAppBasicDocVars( _rxComponent );
pAppMgr->SetGlobalUNOConstant( "ThisComponent", makeAny( _rxComponent ) );
+ }
#if OSL_DEBUG_LEVEL > 0
const char* pComponentImplName = _rxComponent.get() ? typeid( *_rxComponent.get() ).name() : "void";
diff --git a/svx/prj/d.lst b/svx/prj/d.lst
index 7edc2fbc9c..acbb689082 100644
--- a/svx/prj/d.lst
+++ b/svx/prj/d.lst
@@ -658,5 +658,6 @@ mkdir: %_DEST%\inc%_EXT%\svx\sdr\table
..\inc\svx\selectioncontroller.hxx %_DEST%\inc%_EXT%\svx\selectioncontroller.hxx
..\inc\svx\helperhittest3d.hxx %_DEST%\inc%_EXT%\svx\helperhittest3d.hxx
..\inc\svx\optimprove.hxx %_DEST%\inc%_EXT%\svx\optimprove.hxx
+..\inc\svx\msvbahelper.hxx %_DEST%\inc%_EXT%\svx\msvbahelper.hxx
..\%__SRC%\bin\*-layout.zip %_DEST%\pck%_EXT%\*.*
diff --git a/svx/source/msfilter/makefile.mk b/svx/source/msfilter/makefile.mk
index adbe8b1048..53eab95a5b 100644
--- a/svx/source/msfilter/makefile.mk
+++ b/svx/source/msfilter/makefile.mk
@@ -54,7 +54,8 @@ LIB1OBJFILES= \
$(SLO)$/svxmsbas.obj \
$(SLO)$/msocximex.obj \
$(SLO)$/mscodec.obj \
- $(SLO)$/msfiltertracer.obj
+ $(SLO)$/msfiltertracer.obj \
+ $(SLO)$/msvbahelper.obj\
LIB2TARGET= $(SLB)$/$(TARGET)-core.lib
LIB2OBJFILES= \
@@ -70,7 +71,8 @@ EXCEPTIONSFILES= \
$(SLO)$/msocximex.obj \
$(SLO)$/msoleexp.obj \
$(SLO)$/svxmsbas.obj \
- $(SLO)$/msfiltertracer.obj
+ $(SLO)$/msfiltertracer.obj \
+ $(SLO)$/msvbahelper.obj\
.INCLUDE : target.mk