implement Application.Iteration & Application.InchesToPoints
Change-Id: I8d556a7a357fd7ad228a4fe95a54d6685a20e002
This commit is contained in:
@@ -61,6 +61,7 @@ interface XApplication
|
||||
[attribute] boolean DisplayExcel4Menus;
|
||||
[attribute] boolean DisplayNoteIndicator;
|
||||
[attribute] boolean ShowWindowsInTaskbar;
|
||||
[attribute] boolean Iteration;
|
||||
[attribute, readonly] string LibraryPath;
|
||||
[attribute, readonly] string TemplatesPath;
|
||||
[attribute, readonly] string PathSeparator;
|
||||
@@ -86,6 +87,7 @@ interface XApplication
|
||||
raises(com::sun::star::script::BasicErrorException);
|
||||
XRange Union([in] XRange Arg1, [in] XRange Arg2, [in] /*Optional*/ any Arg3, [in] /*Optional*/ any Arg4, [in] /*Optional*/ any Arg5, [in] /*Optional*/ any Arg6, [in] /*Optional*/ any Arg7, [in] /*Optional*/ any Arg8, [in] /*Optional*/ any Arg9, [in] /*Optional*/ any Arg10, [in] /*Optional*/ any Arg11, [in] /*Optional*/ any Arg12, [in] /*Optional*/ any Arg13, [in] /*Optional*/ any Arg14, [in] /*Optional*/ any Arg15, [in] /*Optional*/ any Arg16, [in] /*Optional*/ any Arg17, [in] /*Optional*/ any Arg18, [in] /*Optional*/ any Arg19, [in] /*Optional*/ any Arg20, [in] /*Optional*/ any Arg21, [in] /*Optional*/ any Arg22, [in] /*Optional*/ any Arg23, [in] /*Optional*/ any Arg24, [in] /*Optional*/ any Arg25, [in] /*Optional*/ any Arg26, [in] /*Optional*/ any Arg27, [in] /*Optional*/ any Arg28, [in] /*Optional*/ any Arg29, [in] /*Optional*/ any Arg30)
|
||||
raises(com::sun::star::script::BasicErrorException);
|
||||
double InchesToPoints( [in] double Inches );
|
||||
void Volatile([in] any Volatile);
|
||||
any Caller( [in] any Index );
|
||||
any MenuBars( [in] any aIndex );
|
||||
|
@@ -170,14 +170,14 @@ public:
|
||||
|
||||
// Options:
|
||||
const ScViewOptions& GetViewOptions ();
|
||||
const ScDocOptions& GetDocOptions ();
|
||||
SC_DLLPUBLIC const ScDocOptions& GetDocOptions ();
|
||||
SC_DLLPUBLIC const ScAppOptions& GetAppOptions ();
|
||||
SC_DLLPUBLIC const ScDefaultsOptions& GetDefaultsOptions ();
|
||||
SC_DLLPUBLIC const ScFormulaOptions& GetFormulaOptions ();
|
||||
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 SetDefaultsOptions ( const ScDefaultsOptions& rOpt );
|
||||
SC_DLLPUBLIC void SetFormulaOptions ( const ScFormulaOptions& rOpt );
|
||||
|
@@ -27,6 +27,7 @@
|
||||
#include <com/sun/star/sheet/XCellRangeReferrer.hpp>
|
||||
#include <com/sun/star/sheet/XCalculatable.hpp>
|
||||
#include <com/sun/star/frame/XLayoutManager.hpp>
|
||||
#include <com/sun/star/frame/XDesktop.hpp>
|
||||
#include <com/sun/star/task/XStatusIndicatorSupplier.hpp>
|
||||
#include <com/sun/star/task/XStatusIndicator.hpp>
|
||||
#include <ooo/vba/excel/XlMousePointer.hpp>
|
||||
@@ -90,6 +91,7 @@
|
||||
#include <basic/sbxobj.hxx>
|
||||
|
||||
#include "viewutil.hxx"
|
||||
#include "docoptio.hxx"
|
||||
|
||||
using namespace ::ooo::vba;
|
||||
using namespace ::com::sun::star;
|
||||
@@ -815,6 +817,36 @@ ScVbaApplication::setShowWindowsInTaskbar( sal_Bool bSet ) throw (css::uno::Runt
|
||||
mrAppSettings.mbShowWindowsInTaskbar = bSet;
|
||||
}
|
||||
|
||||
sal_Bool SAL_CALL
|
||||
ScVbaApplication::getIteration() throw (css::uno::RuntimeException)
|
||||
{
|
||||
return SC_MOD()->GetDocOptions().IsIter();
|
||||
}
|
||||
|
||||
void SAL_CALL
|
||||
ScVbaApplication::setIteration( sal_Bool bSet ) throw (css::uno::RuntimeException)
|
||||
{
|
||||
uno::Reference< lang::XMultiComponentFactory > xSMgr(
|
||||
mxContext->getServiceManager(), uno::UNO_QUERY_THROW );
|
||||
|
||||
uno::Reference< frame::XDesktop > xDesktop
|
||||
(xSMgr->createInstanceWithContext( "com.sun.star.frame.Desktop" , mxContext), uno::UNO_QUERY_THROW );
|
||||
uno::Reference< container::XEnumeration > xComponents = xDesktop->getComponents()->createEnumeration();
|
||||
while ( xComponents->hasMoreElements() )
|
||||
{
|
||||
uno::Reference< lang::XServiceInfo > xServiceInfo( xComponents->nextElement(), uno::UNO_QUERY );
|
||||
if ( xServiceInfo.is() && xServiceInfo->supportsService( "com.sun.star.sheet.SpreadsheetDocument" ) )
|
||||
{
|
||||
uno::Reference< beans::XPropertySet > xProps( xServiceInfo, uno::UNO_QUERY );
|
||||
if ( xProps.is() )
|
||||
xProps->setPropertyValue( SC_UNO_ITERENABLED, uno::Any( bSet ) );
|
||||
}
|
||||
}
|
||||
ScDocOptions aOpts( SC_MOD()->GetDocOptions() );
|
||||
aOpts.SetIter( bSet );
|
||||
SC_MOD()->SetDocOptions( aOpts );
|
||||
}
|
||||
|
||||
void SAL_CALL
|
||||
ScVbaApplication::Calculate() throw( script::BasicErrorException , uno::RuntimeException )
|
||||
{
|
||||
@@ -1174,6 +1206,13 @@ uno::Reference< excel::XRange > SAL_CALL ScVbaApplication::Union(
|
||||
return lclCreateVbaRange( mxContext, getCurrentDocument(), aList );
|
||||
}
|
||||
|
||||
double
|
||||
ScVbaApplication::InchesToPoints( double Inches ) throw (uno::RuntimeException )
|
||||
{
|
||||
double result = ( Inches * 72.0 );
|
||||
return result;
|
||||
}
|
||||
|
||||
void
|
||||
ScVbaApplication::Volatile( const uno::Any& aVolatile ) throw ( uno::RuntimeException )
|
||||
{
|
||||
|
@@ -111,6 +111,9 @@ public:
|
||||
virtual void SAL_CALL setDisplayNoteIndicator( sal_Bool bSet ) throw (css::uno::RuntimeException);
|
||||
virtual sal_Bool SAL_CALL getShowWindowsInTaskbar() throw (css::uno::RuntimeException);
|
||||
virtual void SAL_CALL setShowWindowsInTaskbar( sal_Bool bSet ) throw (css::uno::RuntimeException);
|
||||
virtual sal_Bool SAL_CALL getIteration() throw (css::uno::RuntimeException);
|
||||
virtual void SAL_CALL setIteration( sal_Bool bSet ) throw (css::uno::RuntimeException);
|
||||
|
||||
virtual css::uno::Any SAL_CALL Windows( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
|
||||
virtual void SAL_CALL wait( double time ) throw (css::uno::RuntimeException);
|
||||
virtual css::uno::Any SAL_CALL Range( const css::uno::Any& Cell1, const css::uno::Any& Cell2 ) throw (css::uno::RuntimeException);
|
||||
@@ -119,12 +122,13 @@ public:
|
||||
virtual void SAL_CALL Calculate() throw (css::script::BasicErrorException, css::uno::RuntimeException);
|
||||
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Intersect( const css::uno::Reference< ov::excel::XRange >& Arg1, const css::uno::Reference< ov::excel::XRange >& Arg2, const css::uno::Any& Arg3, const css::uno::Any& Arg4, const css::uno::Any& Arg5, const css::uno::Any& Arg6, const css::uno::Any& Arg7, const css::uno::Any& Arg8, const css::uno::Any& Arg9, const css::uno::Any& Arg10, const css::uno::Any& Arg11, const css::uno::Any& Arg12, const css::uno::Any& Arg13, const css::uno::Any& Arg14, const css::uno::Any& Arg15, const css::uno::Any& Arg16, const css::uno::Any& Arg17, const css::uno::Any& Arg18, const css::uno::Any& Arg19, const css::uno::Any& Arg20, const css::uno::Any& Arg21, const css::uno::Any& Arg22, const css::uno::Any& Arg23, const css::uno::Any& Arg24, const css::uno::Any& Arg25, const css::uno::Any& Arg26, const css::uno::Any& Arg27, const css::uno::Any& Arg28, const css::uno::Any& Arg29, const css::uno::Any& Arg30 ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
|
||||
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Union( const css::uno::Reference< ov::excel::XRange >& Arg1, const css::uno::Reference< ov::excel::XRange >& Arg2, const css::uno::Any& Arg3, const css::uno::Any& Arg4, const css::uno::Any& Arg5, const css::uno::Any& Arg6, const css::uno::Any& Arg7, const css::uno::Any& Arg8, const css::uno::Any& Arg9, const css::uno::Any& Arg10, const css::uno::Any& Arg11, const css::uno::Any& Arg12, const css::uno::Any& Arg13, const css::uno::Any& Arg14, const css::uno::Any& Arg15, const css::uno::Any& Arg16, const css::uno::Any& Arg17, const css::uno::Any& Arg18, const css::uno::Any& Arg19, const css::uno::Any& Arg20, const css::uno::Any& Arg21, const css::uno::Any& Arg22, const css::uno::Any& Arg23, const css::uno::Any& Arg24, const css::uno::Any& Arg25, const css::uno::Any& Arg26, const css::uno::Any& Arg27, const css::uno::Any& Arg28, const css::uno::Any& Arg29, const css::uno::Any& Arg30 ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
|
||||
virtual double SAL_CALL InchesToPoints( double InchesToPoints ) throw (css::uno::RuntimeException );
|
||||
virtual void SAL_CALL Volatile( const css::uno::Any& Volatile ) throw (css::uno::RuntimeException );
|
||||
virtual css::uno::Any SAL_CALL MenuBars( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
|
||||
virtual css::uno::Any SAL_CALL Caller( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
|
||||
virtual css::uno::Any SAL_CALL GetOpenFilename( const css::uno::Any& rFileFilter, const css::uno::Any& rFilterIndex, const css::uno::Any& rTitle, const css::uno::Any& rButtonText, const css::uno::Any& rMultiSelect ) throw (css::uno::RuntimeException);
|
||||
virtual css::uno::Any SAL_CALL GetSaveAsFilename( const css::uno::Any& rInitialFileName, const css::uno::Any& rFileFilter, const css::uno::Any& rFilterIndex, const css::uno::Any& rTitle, const css::uno::Any& rButtonText ) throw (css::uno::RuntimeException);
|
||||
virtual void Undo() throw (css::uno::RuntimeException);
|
||||
virtual void SAL_CALL Undo() throw (css::uno::RuntimeException);
|
||||
// XHelperInterface
|
||||
virtual OUString getServiceImplName();
|
||||
virtual css::uno::Sequence<OUString> getServiceNames();
|
||||
|
Reference in New Issue
Block a user