diff options
Diffstat (limited to 'sc/source/ui/vba')
113 files changed, 1159 insertions, 1159 deletions
diff --git a/sc/source/ui/vba/excelvbahelper.hxx b/sc/source/ui/vba/excelvbahelper.hxx index 7eff6768aa96..bdab4fd28ddb 100644 --- a/sc/source/ui/vba/excelvbahelper.hxx +++ b/sc/source/ui/vba/excelvbahelper.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -39,12 +39,12 @@ class ScCellRangesBase; -namespace ooo +namespace ooo { - namespace vba + namespace vba { namespace excel - { + { // nTabs empty means apply zoom to all sheets void implSetZoom( const css::uno::Reference< css::frame::XModel >& xModel, sal_Int16 nZoom, std::vector< SCTAB >& nTabs ); void implnCopy( const css::uno::Reference< css::frame::XModel>& xModel ); diff --git a/sc/source/ui/vba/helperdecl.hxx b/sc/source/ui/vba/helperdecl.hxx index 27930279bcf6..4a0d0d3c01c6 100644 --- a/sc/source/ui/vba/helperdecl.hxx +++ b/sc/source/ui/vba/helperdecl.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -40,7 +40,7 @@ struct vba_service_class_ : public serviceimpl_base< detail::OwnServiceImpl<Impl vba_service_class_() : baseT() {} template <typename PostProcessFuncT> /** Ctor to pass a post processing function/functor. - + @tpl PostProcessDefaultT let your compiler deduce this @param postProcessFunc function/functor that gets the yet unacquired ImplT_ pointer returning a diff --git a/sc/source/ui/vba/service.cxx b/sc/source/ui/vba/service.cxx index e0ed82fbc0fd..875424fc54ea 100644 --- a/sc/source/ui/vba/service.cxx +++ b/sc/source/ui/vba/service.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -51,7 +51,7 @@ namespace worksheet { extern sdecl::ServiceDecl const serviceDecl; } -namespace window +namespace window { extern sdecl::ServiceDecl const serviceDecl; } @@ -59,11 +59,11 @@ namespace globals { extern sdecl::ServiceDecl const serviceDecl; } -namespace hyperlink +namespace hyperlink { extern sdecl::ServiceDecl const serviceDecl; } -namespace application +namespace application { extern sdecl::ServiceDecl const serviceDecl; } @@ -71,27 +71,27 @@ namespace vbaeventshelper { extern sdecl::ServiceDecl const serviceDecl; } -namespace textframe +namespace textframe { extern sdecl::ServiceDecl const serviceDecl; } extern "C" { - SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( + SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) { OSL_TRACE("In component_getImplementationEnv"); *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } - SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( + SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey ) { OSL_TRACE("In component_writeInfo"); #if 0 // Component registration - if ( component_writeInfoHelper( pServiceManager, pRegistryKey, + if ( component_writeInfoHelper( pServiceManager, pRegistryKey, range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, window::serviceDecl, hyperlink::serviceDecl, application::serviceDecl ) && component_writeInfoHelper( pServiceManager, pRegistryKey, vbaeventshelper::serviceDecl ) ) { // Singleton registration @@ -102,7 +102,7 @@ extern "C" Reference< registry::XRegistryKey >xKey = pKey->createKey( rtl::OUString::createFromAscii( ("ooo.vba.Globals/UNO/SINGLETONS/ooo.vba.theGlobals") ) ); - xKey->setStringValue( ::rtl::OUString::createFromAscii( + xKey->setStringValue( ::rtl::OUString::createFromAscii( ("ooo.vba.Globals") ) ); return sal_True; } @@ -114,13 +114,13 @@ extern "C" return sal_False; #else // Component registration - return component_writeInfoHelper( pServiceManager, pRegistryKey, + return component_writeInfoHelper( pServiceManager, pRegistryKey, range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, window::serviceDecl, hyperlink::serviceDecl, application::serviceDecl ) && component_writeInfoHelper( pServiceManager, pRegistryKey, vbaeventshelper::serviceDecl, textframe::serviceDecl ); #endif - + } - SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( + SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey ) { diff --git a/sc/source/ui/vba/testvba/launchTest.pl b/sc/source/ui/vba/testvba/launchTest.pl index 243798616052..5b64f7522c09 100644 --- a/sc/source/ui/vba/testvba/launchTest.pl +++ b/sc/source/ui/vba/testvba/launchTest.pl @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite @@ -31,14 +31,14 @@ my $test_class = shift || die 'must provide a ext name'; my $TESTDOCUMENT = shift || die 'must provide a path to testdocument dirs'; my $OUTPUTDIR = shift || die 'must provide an output path to deposit logs in'; -die "can't access TestClass $test_class/TestVBA.class" unless -f "$test_class/TestVBA.class"; -die "can't access officepath env variable \$OFFICEPATH" unless -d $ENV{OFFICEPATH}; -die "can't access testdocuments" unless -d $TESTDOCUMENT; -die "testdocument not of the correct structure $TESTDOCUMENT/logs/excel" unless -d "$TESTDOCUMENT/logs/excel"; -die "can't access output dir" unless -d $OUTPUTDIR; +die "can't access TestClass $test_class/TestVBA.class" unless -f "$test_class/TestVBA.class"; +die "can't access officepath env variable \$OFFICEPATH" unless -d $ENV{OFFICEPATH}; +die "can't access testdocuments" unless -d $TESTDOCUMENT; +die "testdocument not of the correct structure $TESTDOCUMENT/logs/excel" unless -d "$TESTDOCUMENT/logs/excel"; +die "can't access output dir" unless -d $OUTPUTDIR; -my $officeclasspath = "$ENV{OFFICEPATH}/program/classes/"; +my $officeclasspath = "$ENV{OFFICEPATH}/program/classes/"; my $classpath = "$officeclasspath/jurt.jar:$officeclasspath/unoil.jar:$officeclasspath/juh.jar:$officeclasspath/java_uno.jar:$officeclasspath/ridl.jar:$test_class:$ENV{CLASSPATH}"; $ENV{CLASSPATH}=$classpath; print "classpath $ENV{CLASSPATH}\n"; diff --git a/sc/source/ui/vba/testvba/runTests.pl b/sc/source/ui/vba/testvba/runTests.pl index e686a1d4cb89..70f80329cfeb 100755 --- a/sc/source/ui/vba/testvba/runTests.pl +++ b/sc/source/ui/vba/testvba/runTests.pl @@ -51,7 +51,7 @@ $failed = ( $exit_value || $signal_num || $dumped_core ); print "$failed = ( $exit_value || $signal_num || $dumped_core )\n"; if ( !$failed && open(UNAME, "uname -a|") ) { - $theResult = <UNAME>; + $theResult = <UNAME>; close(UNAME); if ( $theResult =~ /^CYGWIN/ ) { # windows under cygwin @@ -62,7 +62,7 @@ if ( !$failed && open(UNAME, "uname -a|") ) { uri_escape($testDocDir); # hacky windows url construction $testDocDir="file:///$testDocDir"; - + chomp($testDocDir); #print "*** doc dir is $testDocDir\n"; $testLogDir = `cygpath -m "$testLogDir"`; diff --git a/sc/source/ui/vba/testvba/testResult.pl b/sc/source/ui/vba/testvba/testResult.pl index 5f065924d5c4..171be2597ddb 100644 --- a/sc/source/ui/vba/testvba/testResult.pl +++ b/sc/source/ui/vba/testvba/testResult.pl @@ -11,13 +11,13 @@ my $timestampclean= "perl $binDir/timestampsClean.pl"; sub testLog { # 2 No Log to compare against - # 1 Log passed + # 1 Log passed # 0 Log failed my $result = 0; my $testfile = shift; my $dirtocheck = shift; my $filename = basename($testfile); - $filename = "$logdir/$filename"; + $filename = "$logdir/$filename"; print "processing $testfile $filename\n"; if ( -f $filename ) { my $tmpFile; @@ -29,9 +29,9 @@ sub testLog my $info = stat($tmpFile) or die "no $tmpFile: $!"; if ( ($status >>=8) == 0 && ( $info->size == 0) ) { #print "diff worked size is 0\n"; - $result = 1; + $result = 1; } - elsif ( ($status >>=8) == 0 && ( $info->size > 0) ) + elsif ( ($status >>=8) == 0 && ( $info->size > 0) ) { #print "diff worked size > 0\n"; $result = 0; @@ -106,9 +106,9 @@ sub slurp_dir($) while ($fname = readdir ($dirhandle)) { $fname = filter_crud($fname); defined $fname || next; -# if (-d "$dir/$fname") { -# push @files, slurp_dir("$dir/$fname"); -# } else +# if (-d "$dir/$fname") { +# push @files, slurp_dir("$dir/$fname"); +# } else { push @files, "$dir/$fname"; } @@ -136,9 +136,9 @@ print "$testfilepath\n"; for $a (@files) { $filename = $a; if ( "$testfilepath" eq "$filename" ) - { + { $processed++; - my $testcase = $a; + my $testcase = $a; $testcase =~ s/\.log/\.xls/; my $result = testLog( $a, $logdir ); if ( $result == 0 ) { @@ -148,13 +148,13 @@ for $a (@files) { elsif ( $result == 2 ) { #print "skipped $a\n"; push @skippedTests, $testcase; - } + } else { $passed++; push @passedTests, $testcase; - #print "Test document for $a \t \t passed. \n"; - } + #print "Test document for $a \t \t passed. \n"; } + } } my $compared=@passedTests+@failedTests; my $skip = @skippedTests; @@ -163,7 +163,7 @@ print "compared $compared test-case documents\n"; print "\t \t $passed tests $@passedTests\n"; if ( @failedTests > 0 ) { print "the following test-case documents failed, please examine the logs manually\n"; - + for $a (@failedTests) { print "\t$a\n"; } diff --git a/sc/source/ui/vba/testvba/testResults.pl b/sc/source/ui/vba/testvba/testResults.pl index 39ec26ba38be..6f731327e76b 100755 --- a/sc/source/ui/vba/testvba/testResults.pl +++ b/sc/source/ui/vba/testvba/testResults.pl @@ -11,13 +11,13 @@ my $timestampclean= "perl $binDir/timestampsClean.pl"; sub testLog { # 2 No Log to compare against - # 1 Log passed + # 1 Log passed # 0 Log failed my $result = 0; my $testfile = shift; my $dirtocheck = shift; my $filename = basename($testfile); - $filename = "$logdir/$filename"; + $filename = "$logdir/$filename"; print "processing $testfile $filename\n"; if ( -f $filename ) { my $tmpFile; @@ -29,9 +29,9 @@ sub testLog my $info = stat($tmpFile) or die "no $tmpFile: $!"; if ( ($status >>=8) == 0 && ( $info->size == 0) ) { #print "diff worked size is 0\n"; - $result = 1; + $result = 1; } - elsif ( ($status >>=8) == 0 && ( $info->size > 0) ) + elsif ( ($status >>=8) == 0 && ( $info->size > 0) ) { #print "diff worked size > 0\n"; $result = 0; @@ -106,9 +106,9 @@ sub slurp_dir($) while ($fname = readdir ($dirhandle)) { $fname = filter_crud($fname); defined $fname || next; -# if (-d "$dir/$fname") { -# push @files, slurp_dir("$dir/$fname"); -# } else +# if (-d "$dir/$fname") { +# push @files, slurp_dir("$dir/$fname"); +# } else { push @files, "$dir/$fname"; } @@ -131,7 +131,7 @@ my @failedTests=(); my $failureCmd=""; for $a (@files) { $processed++; - my $testcase = $a; + my $testcase = $a; $testcase =~ s/\.log/\.xls/; my $result = testLog( $a, $logdir ); if ( $result == 0 ) { @@ -141,12 +141,12 @@ for $a (@files) { elsif ( $result == 2 ) { #print "skipped $a\n"; push @skippedTests, $testcase; - } + } else { $passed++; push @passedTests, $testcase; - #print "Test document for $a \t \t passed. \n"; - } + #print "Test document for $a \t \t passed. \n"; + } } my $compared=@passedTests+@failedTests; my $skip = @skippedTests; @@ -155,7 +155,7 @@ print "compared $compared test-case documents\n"; print "\t \t $passed tests $@passedTests\n"; if ( @failedTests > 0 ) { print "the following test-case documents failed, please examine the logs manually\n"; - + for $a (@failedTests) { print "\t$a\n"; } diff --git a/sc/source/ui/vba/testvba/testvba.cxx b/sc/source/ui/vba/testvba/testvba.cxx index cf04d45250db..f240c523edc6 100644 --- a/sc/source/ui/vba/testvba/testvba.cxx +++ b/sc/source/ui/vba/testvba/testvba.cxx @@ -45,7 +45,7 @@ using ::rtl::OUString; using ::std::auto_ptr; -const OUString EXTN = rtl::OUString::createFromAscii(".xls"); +const OUString EXTN = rtl::OUString::createFromAscii(".xls"); OUString convertToURL( const OUString& rPath ) { @@ -92,16 +92,16 @@ private: rtl::OUString msOutDirPath; protected: public: - TestVBA( const Reference< XComponentContext >& _xContext, - const Reference< XMultiComponentFactory >& _xMCF, - const Reference< XComponentLoader >& _xCompLoader, - const rtl::OUString& _outDirPath ) : mxContext( _xContext ), mxMCF( _xMCF ), -mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath ) ) + TestVBA( const Reference< XComponentContext >& _xContext, + const Reference< XMultiComponentFactory >& _xMCF, + const Reference< XComponentLoader >& _xCompLoader, + const rtl::OUString& _outDirPath ) : mxContext( _xContext ), mxMCF( _xMCF ), +mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath ) ) { mxSFA.set( mxMCF->createInstanceWithContext( rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ), mxContext), uno::UNO_QUERY_THROW ); - } + } - rtl::OUString getLogLocation() throw ( beans::UnknownPropertyException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::Exception ) + rtl::OUString getLogLocation() throw ( beans::UnknownPropertyException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::Exception ) { rtl::OUString sLogLocation; Reference< XPropertySet > pathSettings( mxMCF->createInstanceWithContext( rtl::OUString::createFromAscii( "com.sun.star.comp.framework.PathSettings" ), mxContext), uno::UNO_QUERY_THROW ); @@ -109,7 +109,7 @@ mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath ) ) sLogLocation = sLogLocation.concat( rtl::OUString::createFromAscii( "/" ) ).concat( rtl::OUString::createFromAscii( "HelperAPI-test.log" ) ); return sLogLocation; } - rtl::OUString getLogLocationWithName( OUString fileName ) throw ( beans::UnknownPropertyException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::Exception ) + rtl::OUString getLogLocationWithName( OUString fileName ) throw ( beans::UnknownPropertyException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::Exception ) { printf("%s\n", getenv("HOME") ); printf("file name %s\n", rtl::OUStringToOString( fileName, RTL_TEXTENCODING_UTF8 ).getStr() ); @@ -121,17 +121,17 @@ mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath ) ) return sLogLocation; } - void init() + void init() { // blow away previous logs? } - void proccessDocument( const rtl::OUString& sUrl ) + void proccessDocument( const rtl::OUString& sUrl ) { - if ( !mxSFA->isFolder( sUrl ) && sUrl.endsWithIgnoreAsciiCaseAsciiL( ".xls", 4 ) ) - + if ( !mxSFA->isFolder( sUrl ) && sUrl.endsWithIgnoreAsciiCaseAsciiL( ".xls", 4 ) ) + { - try + try { OSL_TRACE( "processing %s", rtl::OUStringToOString( sUrl, RTL_TEXTENCODING_UTF8 ).getStr() ); printf( "processing %s\n", rtl::OUStringToOString( sUrl, RTL_TEXTENCODING_UTF8 ).getStr() ); @@ -142,17 +142,17 @@ mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath ) ) rtl::OUString sfileUrl = convertToURL( sUrl ); printf( "try to get xDoc %s\n", rtl::OUStringToOString( sfileUrl, RTL_TEXTENCODING_UTF8 ).getStr() ); - Reference< uno::XInterface > xDoc = + Reference< uno::XInterface > xDoc = mxCompLoader->loadComponentFromURL( sfileUrl, rtl::OUString::createFromAscii( "_blank" ), 0, propertyValues); printf( "got xDoc\n" ); OUString logFileURL = convertToURL( getLogLocation() ); try { - Reference< script::provider::XScriptProviderSupplier > xSupplier( xDoc, uno::UNO_QUERY_THROW ) ; - if ( mxSFA->exists( logFileURL ) ) + Reference< script::provider::XScriptProviderSupplier > xSupplier( xDoc, uno::UNO_QUERY_THROW ) ; + if ( mxSFA->exists( logFileURL ) ) mxSFA->kill( logFileURL ); - + printf("try to get the ScriptProvider\n"); Reference< script::provider::XScriptProvider > xProv = xSupplier->getScriptProvider(); printf("get the ScriptProvider\n"); @@ -176,9 +176,9 @@ mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath ) ) Sequence< uno::Any > aArgs; Sequence< sal_Int16 > aOutArgsIndex; Sequence< uno::Any > aOutArgs; - - xScript->invoke(aArgs, aOutArgsIndex, aOutArgs); - + + xScript->invoke(aArgs, aOutArgsIndex, aOutArgs); + OUString fileName = sUrl.copy ( sUrl.lastIndexOf( '/' ) ); OUString newLocation = msOutDirPath + fileName.copy ( 0, fileName.lastIndexOf( EXTN ) ) + rtl::OUString::createFromAscii( ".log" ); try @@ -196,7 +196,7 @@ mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath ) ) OSL_TRACE("new logfile location is %s ", rtl::OUStringToOString( newLocation, RTL_TEXTENCODING_UTF8 ).getStr() ); printf("moved to new location\n"); } - + } catch ( uno::Exception& e ) { @@ -205,8 +205,8 @@ mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath ) ) // interface is supported, otherwise use XComponent.dispose Reference< util::XCloseable > xCloseable ( xDoc, uno::UNO_QUERY ); - - if ( xCloseable.is() ) + + if ( xCloseable.is() ) { printf("try to close\n"); // will close application. and only run a test case for 3.0 @@ -216,8 +216,8 @@ mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath ) ) // so, for run all test cases, it should not close the document at this moment. xCloseable->close(sal_False); printf("closed\n"); - } - else + } + else { printf("try to dispose\n"); Reference< XComponent > xComp( xDoc, uno::UNO_QUERY_THROW ); @@ -226,32 +226,32 @@ mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath ) ) printf("disposed\n"); } } - catch( uno::Exception& e ) + catch( uno::Exception& e ) { std::cerr << "Caught exception " << rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() << std::endl; } - + } printf("complete processing %s\n", rtl::OUStringToOString( sUrl, RTL_TEXTENCODING_UTF8 ).getStr() ); } - void traverse( const rtl::OUString& sFileDirectory ) + void traverse( const rtl::OUString& sFileDirectory ) { - rtl::OUString sFileDirectoryURL = convertToURL( sFileDirectory ); - if ( !mxSFA->isFolder( sFileDirectoryURL) ) + rtl::OUString sFileDirectoryURL = convertToURL( sFileDirectory ); + if ( !mxSFA->isFolder( sFileDirectoryURL) ) { throw lang::IllegalArgumentException( rtl::OUString::createFromAscii( "not a directory: ").concat( sFileDirectoryURL ), Reference<uno::XInterface>(), 1 ); - } + } // Getting all files and directories in the current directory Sequence<OUString> entries = mxSFA->getFolderContents( sFileDirectoryURL, sal_False ); - + // Iterating for each file and directory printf( "Entries %d\n", (int)entries.getLength() ); - for ( sal_Int32 i = 0; i < entries.getLength(); ++i ) + for ( sal_Int32 i = 0; i < entries.getLength(); ++i ) { proccessDocument( entries[ i ] ); } - } + } }; void tryDispose( Reference< uno::XInterface > xIF, const char* sComp ) @@ -262,7 +262,7 @@ void tryDispose( Reference< uno::XInterface > xIF, const char* sComp ) try { xComponent->dispose(); - } + } catch( uno::Exception& e ) { std::cerr << "tryDispose caught exception " <<rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() << " while disposing " << sComp << std::endl; @@ -298,8 +298,8 @@ int main( int argv, char** argc ) dTest->traverse( ascii( argc[ 1 ] ) ); } delete dTest; -// tryDispose( xLoader, "desktop" ); -// tryDispose( xCC, "remote context" ); +// tryDispose( xLoader, "desktop" ); +// tryDispose( xCC, "remote context" ); } catch( uno::Exception& e ) diff --git a/sc/source/ui/vba/testvba/timestampsClean.pl b/sc/source/ui/vba/testvba/timestampsClean.pl index dade65c7200f..2c947d0cc6d5 100755 --- a/sc/source/ui/vba/testvba/timestampsClean.pl +++ b/sc/source/ui/vba/testvba/timestampsClean.pl @@ -65,7 +65,7 @@ while (<>) { output_lines(\@lines); # $detectedSomeGuff contains the skipped hunks that contain acceptable diff -# e.g. a timestamp or an OK assertion that contains different content +# e.g. a timestamp or an OK assertion that contains different content # like perhaps a path #print "frag_count = $frag_count fragstocount = $fragstocount detectedSomeGuff = $detectedSomeGuff \n"; if ($frag_count > $detectedSomeGuff) { diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx index 7ed96e7f900e..8c9581a66d23 100644 --- a/sc/source/ui/vba/vbaapplication.cxx +++ b/sc/source/ui/vba/vbaapplication.cxx @@ -1706,31 +1706,31 @@ ConvertCountryCode(const OUString& language) if( language == OUString::createFromAscii("ar") ) nCode = 966; // Arabic else if ( language == OUString::createFromAscii("cs") ) nCode = 42; // Czech - else if ( language == OUString::createFromAscii("da") ) nCode = 45; // Danish - else if ( language == OUString::createFromAscii("de") ) nCode = 49; // German - else if ( language == OUString::createFromAscii("en") ) nCode = 1; // English - else if ( language == OUString::createFromAscii("es") ) nCode = 34; // Spanish - else if ( language == OUString::createFromAscii("el") ) nCode = 30; // Greek - else if ( language == OUString::createFromAscii("fa") ) nCode = 98; // Persian = Farsi + else if ( language == OUString::createFromAscii("da") ) nCode = 45; // Danish + else if ( language == OUString::createFromAscii("de") ) nCode = 49; // German + else if ( language == OUString::createFromAscii("en") ) nCode = 1; // English + else if ( language == OUString::createFromAscii("es") ) nCode = 34; // Spanish + else if ( language == OUString::createFromAscii("el") ) nCode = 30; // Greek + else if ( language == OUString::createFromAscii("fa") ) nCode = 98; // Persian = Farsi else if ( language == OUString::createFromAscii("fi") ) nCode = 358; // Finnish - else if ( language == OUString::createFromAscii("fr") ) nCode = 33; // French - else if ( language == OUString::createFromAscii("he") ) nCode = 972; // Hebrew - else if ( language == OUString::createFromAscii("hi") ) nCode = 91; // Indian = Hindi - else if ( language == OUString::createFromAscii("hu") ) nCode = 36; // Hungarian - else if ( language == OUString::createFromAscii("it") ) nCode = 39; // Italian - else if ( language == OUString::createFromAscii("ja") ) nCode = 81; // Japanese - else if ( language == OUString::createFromAscii("ko") ) nCode = 82; // Korean - else if ( language == OUString::createFromAscii("nl") ) nCode = 31; // Dutch - else if ( language == OUString::createFromAscii("no") ) nCode = 47; // Norwegian - else if ( language == OUString::createFromAscii("pl") ) nCode = 48; // Polish - else if ( language == OUString::createFromAscii("pt") ) nCode = 351; // Portuguese - else if ( language == OUString::createFromAscii("ru") ) nCode = 7; // Russian + else if ( language == OUString::createFromAscii("fr") ) nCode = 33; // French + else if ( language == OUString::createFromAscii("he") ) nCode = 972; // Hebrew + else if ( language == OUString::createFromAscii("hi") ) nCode = 91; // Indian = Hindi + else if ( language == OUString::createFromAscii("hu") ) nCode = 36; // Hungarian + else if ( language == OUString::createFromAscii("it") ) nCode = 39; // Italian + else if ( language == OUString::createFromAscii("ja") ) nCode = 81; // Japanese + else if ( language == OUString::createFromAscii("ko") ) nCode = 82; // Korean + else if ( language == OUString::createFromAscii("nl") ) nCode = 31; // Dutch + else if ( language == OUString::createFromAscii("no") ) nCode = 47; // Norwegian + else if ( language == OUString::createFromAscii("pl") ) nCode = 48; // Polish + else if ( language == OUString::createFromAscii("pt") ) nCode = 351; // Portuguese + else if ( language == OUString::createFromAscii("ru") ) nCode = 7; // Russian else if ( language == OUString::createFromAscii("sv") ) nCode = 46; // Swedish - else if ( language == OUString::createFromAscii("th") ) nCode = 66; // Thai - else if ( language == OUString::createFromAscii("tk") ) nCode = 90; // Turkish - else if ( language == OUString::createFromAscii("ur") ) nCode = 92; // Urdu - else if ( language == OUString::createFromAscii("vi") ) nCode = 84; // Vietnamese - else if ( language == OUString::createFromAscii("zh") ) nCode = 86; // Simplified Chinese + else if ( language == OUString::createFromAscii("th") ) nCode = 66; // Thai + else if ( language == OUString::createFromAscii("tk") ) nCode = 90; // Turkish + else if ( language == OUString::createFromAscii("ur") ) nCode = 92; // Urdu + else if ( language == OUString::createFromAscii("vi") ) nCode = 84; // Vietnamese + else if ( language == OUString::createFromAscii("zh") ) nCode = 86; // Simplified Chinese return nCode; } diff --git a/sc/source/ui/vba/vbaassistant.cxx b/sc/source/ui/vba/vbaassistant.cxx index 714bb783f3cb..43ab4589809c 100644 --- a/sc/source/ui/vba/vbaassistant.cxx +++ b/sc/source/ui/vba/vbaassistant.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -76,51 +76,51 @@ void SAL_CALL ScVbaAssistant::setOn( sal_Bool bOn ) throw (uno::RuntimeException } -::sal_Int32 SAL_CALL +::sal_Int32 SAL_CALL ScVbaAssistant::getTop() throw (css::uno::RuntimeException) { return m_nPointsTop; } -void SAL_CALL +void SAL_CALL ScVbaAssistant::setTop( ::sal_Int32 _top ) throw (css::uno::RuntimeException) { m_nPointsTop = _top; } -::sal_Int32 SAL_CALL +::sal_Int32 SAL_CALL ScVbaAssistant::getLeft() throw (css::uno::RuntimeException) { return m_nPointsLeft; } -void SAL_CALL +void SAL_CALL ScVbaAssistant::setLeft( ::sal_Int32 _left ) throw (css::uno::RuntimeException) { m_nPointsLeft = _left; } -::sal_Int32 SAL_CALL +::sal_Int32 SAL_CALL ScVbaAssistant::getAnimation() throw (css::uno::RuntimeException) { return m_nAnimation; } -void SAL_CALL +void SAL_CALL ScVbaAssistant::setAnimation( ::sal_Int32 _animation ) throw (css::uno::RuntimeException) { m_nAnimation = _animation; } -::rtl::OUString SAL_CALL +::rtl::OUString SAL_CALL ScVbaAssistant::Name( ) throw (css::script::BasicErrorException, css::uno::RuntimeException) { return m_sName; } -rtl::OUString& +rtl::OUString& ScVbaAssistant::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaAssistant") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > ScVbaAssistant::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sc/source/ui/vba/vbaassistant.hxx b/sc/source/ui/vba/vbaassistant.hxx index 8490927c3240..7c8f93186e8c 100644 --- a/sc/source/ui/vba/vbaassistant.hxx +++ b/sc/source/ui/vba/vbaassistant.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -50,7 +50,7 @@ private: public: ScVbaAssistant( const css::uno::Reference< ov::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext > xContext ); virtual ~ScVbaAssistant(); - // XAssistant + // XAssistant virtual sal_Bool SAL_CALL getOn() throw (css::uno::RuntimeException); virtual void SAL_CALL setOn( sal_Bool _on ) throw (css::uno::RuntimeException); virtual sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException); diff --git a/sc/source/ui/vba/vbaaxes.cxx b/sc/source/ui/vba/vbaaxes.cxx index eac7083a797c..e528b949ff2c 100644 --- a/sc/source/ui/vba/vbaaxes.cxx +++ b/sc/source/ui/vba/vbaaxes.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,7 +42,7 @@ using namespace ::ooo::vba::excel::XlAxisGroup; // each 'Item' in the Axes collection is indexed via 2 indexes, group and type. // We need to 'flatten' this into a single index in order to be able to wrap // iteration over the set of Axis(s) in a XIndexAccess implementation -// +// typedef ::std::pair<sal_Int32, sal_Int32 > AxesCoordinate; // type and group combination typedef ::std::vector< AxesCoordinate > vecAxesIndices; @@ -71,7 +71,7 @@ public: uno::Reference< excel::XAxis > ScVbaAxes::createAxis( const uno::Reference< excel::XChart >& xChart, const uno::Reference< uno::XComponentContext >& xContext, sal_Int32 nType, sal_Int32 nAxisGroup ) throw ( uno::RuntimeException ) { - ScVbaChart* pChart = static_cast< ScVbaChart* >( xChart.get() ); + ScVbaChart* pChart = static_cast< ScVbaChart* >( xChart.get() ); if ( !pChart ) throw uno::RuntimeException( rtl::OUString::createFromAscii( "Object failure, can't access chart implementation" ), uno::Reference< uno::XInterface >() ); @@ -90,18 +90,18 @@ ScVbaAxes::createAxis( const uno::Reference< excel::XChart >& xChart, const uno: class AxisIndexWrapper : public AxisIndexWrapper_BASE { - // if necessary for better performance we could change this into a map and cache the + // if necessary for better performance we could change this into a map and cache the // indices -> Axis, currently we create a new Axis object // on each getByIndex uno::Reference< uno::XComponentContext > mxContext; vecAxesIndices mCoordinates; uno::Reference< excel::XChart > mxChart; -public: +public: AxisIndexWrapper( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< excel::XChart >& xChart ) : mxContext( xContext ), mxChart( xChart ) { if ( mxChart.is() ) { - ScVbaChart* pChart = static_cast< ScVbaChart* >( mxChart.get() ); + ScVbaChart* pChart = static_cast< ScVbaChart* >( mxChart.get() ); // primary sal_Bool bBool = false; uno::Reference< beans::XPropertySet > xDiagramPropertySet( pChart->xDiagramPropertySet() ); @@ -109,7 +109,7 @@ public: mCoordinates.push_back( AxesCoordinate( xlPrimary, xlCategory ) ); if ( ( xDiagramPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HasYAxis" ) ) ) >>= bBool ) && bBool ) mCoordinates.push_back( AxesCoordinate( xlPrimary, xlSeriesAxis ) ); - + if ( pChart->is3D() ) mCoordinates.push_back( AxesCoordinate( xlPrimary, xlValue ) ); @@ -119,7 +119,7 @@ public: if ( ( xDiagramPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HasSecondaryYAxis" ) ) ) >>= bBool ) && bBool ) mCoordinates.push_back( AxesCoordinate( xlSecondary, xlSeriesAxis ) ); } - + } virtual ::sal_Int32 SAL_CALL getCount() throw (uno::RuntimeException) { return mCoordinates.size(); } virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, ::uno::RuntimeException) @@ -148,19 +148,19 @@ ScVbaAxes::ScVbaAxes( const uno::Reference< XHelperInterface >& xParent,const un { } -uno::Type SAL_CALL +uno::Type SAL_CALL ScVbaAxes::getElementType() throw (css::uno::RuntimeException) { - return excel::XAxes::static_type(0); + return excel::XAxes::static_type(0); } -uno::Reference< container::XEnumeration > SAL_CALL +uno::Reference< container::XEnumeration > SAL_CALL ScVbaAxes::createEnumeration() throw (css::uno::RuntimeException) { return new EnumWrapper( m_xIndexAccess ); } -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaAxes::Item( const css::uno::Any& _nType, const css::uno::Any& _oAxisGroup) throw (css::uno::RuntimeException) { // #TODO map the possible index combinations to a container::XIndexAccess wrapper impl @@ -177,20 +177,20 @@ ScVbaAxes::Item( const css::uno::Any& _nType, const css::uno::Any& _oAxisGroup) return uno::makeAny( createAxis( moChartParent, mxContext, nType, nAxisGroup ) ); } -uno::Any +uno::Any ScVbaAxes::createCollectionObject(const css::uno::Any& aSource) { return aSource; // pass through ( it's already an XAxis object } -rtl::OUString& +rtl::OUString& ScVbaAxes::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaAxes") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > ScVbaAxes::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sc/source/ui/vba/vbaaxes.hxx b/sc/source/ui/vba/vbaaxes.hxx index f135f8e65c71..a9ebf1a76138 100644 --- a/sc/source/ui/vba/vbaaxes.hxx +++ b/sc/source/ui/vba/vbaaxes.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -40,7 +40,7 @@ public: ScVbaAxes( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< ov::excel::XChart >& xChart ); // XEnumerationAccess virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException); - virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException); + virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException); css::uno::Any SAL_CALL Item( const css::uno::Any& aIndex, const css::uno::Any& aIndex2 ) throw (css::uno::RuntimeException); virtual css::uno::Any createCollectionObject(const css::uno::Any&); // XHelperInterface diff --git a/sc/source/ui/vba/vbaaxis.cxx b/sc/source/ui/vba/vbaaxis.cxx index d51534264e38..9e17b30135a4 100644 --- a/sc/source/ui/vba/vbaaxis.cxx +++ b/sc/source/ui/vba/vbaaxis.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,7 +42,7 @@ const rtl::OUString ORIGIN( RTL_CONSTASCII_USTRINGPARAM("Origin") ); const rtl::OUString AUTOORIGIN( RTL_CONSTASCII_USTRINGPARAM("AutoOrigin") ); const rtl::OUString VBA_MIN( RTL_CONSTASCII_USTRINGPARAM("Max") ); const rtl::OUString VBA_MAX( RTL_CONSTASCII_USTRINGPARAM("Min") ); -ScVbaChart* +ScVbaChart* ScVbaAxis::getChartPtr() throw( uno::RuntimeException ) { ScVbaChart* pChart = static_cast< ScVbaChart* >( moChartParent.get() ); @@ -51,7 +51,7 @@ ScVbaAxis::getChartPtr() throw( uno::RuntimeException ) return pChart; } -sal_Bool +sal_Bool ScVbaAxis::isValueAxis() throw( script::BasicErrorException ) { if ( getType() == xlCategory ) @@ -61,29 +61,29 @@ ScVbaAxis::isValueAxis() throw( script::BasicErrorException ) return sal_True; } -ScVbaAxis::ScVbaAxis( const uno::Reference< XHelperInterface >& xParent,const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& _xPropertySet, sal_Int32 _nType, sal_Int32 _nGroup ) : ScVbaAxis_BASE( xParent, xContext ), mxPropertySet( _xPropertySet ), mnType( _nType ), mnGroup( _nGroup ), bCrossesAreCustomized( sal_False ) +ScVbaAxis::ScVbaAxis( const uno::Reference< XHelperInterface >& xParent,const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& _xPropertySet, sal_Int32 _nType, sal_Int32 _nGroup ) : ScVbaAxis_BASE( xParent, xContext ), mxPropertySet( _xPropertySet ), mnType( _nType ), mnGroup( _nGroup ), bCrossesAreCustomized( sal_False ) { oShapeHelper.reset( new ShapeHelper( uno::Reference< drawing::XShape >( mxPropertySet, uno::UNO_QUERY ) ) ); moChartParent.set( xParent, uno::UNO_QUERY_THROW ); setType(_nType); - setCrosses(xlAxisCrossesAutomatic); + setCrosses(xlAxisCrossesAutomatic); } -void SAL_CALL +void SAL_CALL ScVbaAxis::Delete( ) throw (script::BasicErrorException, uno::RuntimeException) { uno::Reference< lang::XComponent > xComponent( mxPropertySet, uno::UNO_QUERY_THROW ); xComponent->dispose(); } - uno::Reference< ::ooo::vba::excel::XAxisTitle > SAL_CALL + uno::Reference< ::ooo::vba::excel::XAxisTitle > SAL_CALL ScVbaAxis::getAxisTitle( ) throw (script::BasicErrorException, uno::RuntimeException) { uno::Reference< excel::XAxisTitle > xAxisTitle; try { ScVbaChart* pChart = getChartPtr(); - + if (getHasTitle() ) { int nType = getType(); @@ -98,7 +98,7 @@ ScVbaAxis::getAxisTitle( ) throw (script::BasicErrorException, uno::RuntimeExce default: // xlValue: xAxisTitle = new ScVbaAxisTitle(this, mxContext, pChart->xAxisYSupplier->getYAxisTitle()); break; - } + } } } catch (uno::Exception& e) @@ -109,20 +109,20 @@ ScVbaAxis::getAxisTitle( ) throw (script::BasicErrorException, uno::RuntimeExce } -void SAL_CALL +void SAL_CALL ScVbaAxis::setDisplayUnit( ::sal_Int32 /*DisplayUnit*/ ) throw (script::BasicErrorException, uno::RuntimeException) { DebugHelper::exception(SbERR_NOT_IMPLEMENTED, rtl::OUString()); } -::sal_Int32 SAL_CALL +::sal_Int32 SAL_CALL ScVbaAxis::getDisplayUnit( ) throw (script::BasicErrorException, uno::RuntimeException) { DebugHelper::exception(SbERR_NOT_IMPLEMENTED, rtl::OUString()); return -1; } -void SAL_CALL +void SAL_CALL ScVbaAxis::setCrosses( ::sal_Int32 _nCrosses ) throw (script::BasicErrorException, uno::RuntimeException) { try @@ -130,16 +130,16 @@ ScVbaAxis::setCrosses( ::sal_Int32 _nCrosses ) throw (script::BasicErrorExceptio double fNum = 0.0; switch (_nCrosses) { - case xlAxisCrossesAutomatic: //Microsoft Excel sets the axis crossing point. + case xlAxisCrossesAutomatic: //Microsoft Excel sets the axis crossing point. mxPropertySet->setPropertyValue(AUTOORIGIN, uno::makeAny( sal_True ) ); bCrossesAreCustomized = sal_False; return; - case xlAxisCrossesMinimum: // The axis crosses at the minimum value. + case xlAxisCrossesMinimum: // The axis crosses at the minimum value. mxPropertySet->getPropertyValue(VBA_MIN) >>= fNum; setCrossesAt( fNum ); bCrossesAreCustomized = sal_False; break; - case xlAxisCrossesMaximum: // The axis crosses at the maximum value. + case xlAxisCrossesMaximum: // The axis crosses at the maximum value. mxPropertySet->getPropertyValue(VBA_MAX) >>= fNum; setCrossesAt(fNum); bCrossesAreCustomized = sal_False; @@ -148,14 +148,14 @@ ScVbaAxis::setCrosses( ::sal_Int32 _nCrosses ) throw (script::BasicErrorExceptio bCrossesAreCustomized = sal_True; break; } - mxPropertySet->setPropertyValue(AUTOORIGIN, uno::makeAny(sal_False) ); + mxPropertySet->setPropertyValue(AUTOORIGIN, uno::makeAny(sal_False) ); } catch (uno::Exception& ) { DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString()); } } -::sal_Int32 SAL_CALL +::sal_Int32 SAL_CALL ScVbaAxis::getCrosses( ) throw (script::BasicErrorException, uno::RuntimeException) { sal_Int32 nCrosses = xlAxisCrossesCustom; @@ -168,7 +168,7 @@ ScVbaAxis::getCrosses( ) throw (script::BasicErrorException, uno::RuntimeExcept else { if (bCrossesAreCustomized) - nCrosses = xlAxisCrossesCustom; + nCrosses = xlAxisCrossesCustom; else { double forigin = 0.0; @@ -190,7 +190,7 @@ ScVbaAxis::getCrosses( ) throw (script::BasicErrorException, uno::RuntimeExcept return nCrosses; } - void SAL_CALL + void SAL_CALL ScVbaAxis::setCrossesAt( double _fCrossesAt ) throw (script::BasicErrorException, uno::RuntimeException) { try @@ -207,7 +207,7 @@ ScVbaAxis::setCrossesAt( double _fCrossesAt ) throw (script::BasicErrorException } } - double SAL_CALL + double SAL_CALL ScVbaAxis::getCrossesAt( ) throw (script::BasicErrorException, uno::RuntimeException) { double fCrosses = 0.0; @@ -222,19 +222,19 @@ ScVbaAxis::getCrossesAt( ) throw (script::BasicErrorException, uno::RuntimeExce return fCrosses; } -void SAL_CALL +void SAL_CALL ScVbaAxis::setType( ::sal_Int32 _nType ) throw (script::BasicErrorException, uno::RuntimeException) { mnType = _nType; } -::sal_Int32 SAL_CALL +::sal_Int32 SAL_CALL ScVbaAxis::getType( ) throw (script::BasicErrorException, uno::RuntimeException) { return mnType; } -void SAL_CALL +void SAL_CALL ScVbaAxis::setHasTitle( ::sal_Bool _bHasTitle ) throw (script::BasicErrorException, uno::RuntimeException) { try @@ -251,16 +251,16 @@ ScVbaAxis::setHasTitle( ::sal_Bool _bHasTitle ) throw (script::BasicErrorExcepti break; default: // xlValue: pChart->mxDiagramPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HasYAxisTitle")), uno::makeAny(_bHasTitle)); - } + } } catch (uno::Exception& e) { DebugHelper::exception(e); - } + } } - ::sal_Bool SAL_CALL + ::sal_Bool SAL_CALL ScVbaAxis::getHasTitle( ) throw (script::BasicErrorException, uno::RuntimeException) { sal_Bool bHasTitle = sal_False; @@ -278,7 +278,7 @@ ScVbaAxis::getHasTitle( ) throw (script::BasicErrorException, uno::RuntimeExcep break; default: // xlValue: pChart->mxDiagramPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HasYAxisTitle")) ) >>= bHasTitle; - } + } } catch (uno::Exception& e) { @@ -287,13 +287,13 @@ ScVbaAxis::getHasTitle( ) throw (script::BasicErrorException, uno::RuntimeExcep return bHasTitle; } -void SAL_CALL +void SAL_CALL ScVbaAxis::setMinorUnit( double _fMinorUnit ) throw (script::BasicErrorException, uno::RuntimeException) { try { if (isValueAxis()) - mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("StepHelp") ), uno::makeAny(_fMinorUnit)); + mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("StepHelp") ), uno::makeAny(_fMinorUnit)); } catch (uno::Exception& ) { @@ -301,7 +301,7 @@ ScVbaAxis::setMinorUnit( double _fMinorUnit ) throw (script::BasicErrorException } } -double SAL_CALL +double SAL_CALL ScVbaAxis::getMinorUnit( ) throw (script::BasicErrorException, uno::RuntimeException) { double fMinor = 1.0; @@ -317,7 +317,7 @@ ScVbaAxis::getMinorUnit( ) throw (script::BasicErrorException, uno::RuntimeExce return fMinor; } -void SAL_CALL +void SAL_CALL ScVbaAxis::setMinorUnitIsAuto( ::sal_Bool _bMinorUnitIsAuto ) throw (script::BasicErrorException, uno::RuntimeException) { try @@ -331,7 +331,7 @@ ScVbaAxis::setMinorUnitIsAuto( ::sal_Bool _bMinorUnitIsAuto ) throw (script::Bas } } - ::sal_Bool SAL_CALL + ::sal_Bool SAL_CALL ScVbaAxis::getMinorUnitIsAuto( ) throw (script::BasicErrorException, uno::RuntimeException) { sal_Bool bIsAuto = sal_False; @@ -349,27 +349,27 @@ ScVbaAxis::getMinorUnitIsAuto( ) throw (script::BasicErrorException, uno::Runti return bIsAuto; } -void SAL_CALL +void SAL_CALL ScVbaAxis::setReversePlotOrder( ::sal_Bool /*ReversePlotOrder*/ ) throw (script::BasicErrorException, uno::RuntimeException) { DebugHelper::exception(SbERR_NOT_IMPLEMENTED, rtl::OUString()); } -::sal_Bool SAL_CALL +::sal_Bool SAL_CALL ScVbaAxis::getReversePlotOrder( ) throw (script::BasicErrorException, uno::RuntimeException) { DebugHelper::exception(SbERR_NOT_IMPLEMENTED, rtl::OUString()); return sal_False; } -void SAL_CALL +void SAL_CALL ScVbaAxis::setMajorUnit( double _fMajorUnit ) throw (script::BasicErrorException, uno::RuntimeException) { try { if (isValueAxis()) { - mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("StepMain")), uno::makeAny(_fMajorUnit)); + mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("StepMain")), uno::makeAny(_fMajorUnit)); } } catch (uno::Exception& ) @@ -378,7 +378,7 @@ ScVbaAxis::setMajorUnit( double _fMajorUnit ) throw (script::BasicErrorException } } -double SAL_CALL +double SAL_CALL ScVbaAxis::getMajorUnit( ) throw (script::BasicErrorException, uno::RuntimeException) { double fMax = 1.0; @@ -394,7 +394,7 @@ ScVbaAxis::getMajorUnit( ) throw (script::BasicErrorException, uno::RuntimeExce return fMax; } -void SAL_CALL +void SAL_CALL ScVbaAxis::setMajorUnitIsAuto( ::sal_Bool _bMajorUnitIsAuto ) throw (script::BasicErrorException, uno::RuntimeException) { try @@ -410,7 +410,7 @@ ScVbaAxis::setMajorUnitIsAuto( ::sal_Bool _bMajorUnitIsAuto ) throw (script::Bas } } -::sal_Bool SAL_CALL +::sal_Bool SAL_CALL ScVbaAxis::getMajorUnitIsAuto( ) throw (script::BasicErrorException, uno::RuntimeException) { sal_Bool bIsAuto = sal_False; @@ -428,14 +428,14 @@ ScVbaAxis::getMajorUnitIsAuto( ) throw (script::BasicErrorException, uno::Runti return bIsAuto; } -void SAL_CALL +void SAL_CALL ScVbaAxis::setMaximumScale( double _fMaximumScale ) throw (script::BasicErrorException, uno::RuntimeException) { try { if ( isValueAxis() ) { - mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Max" ) ), uno::makeAny(_fMaximumScale)); + mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Max" ) ), uno::makeAny(_fMaximumScale)); } } catch ( uno::Exception& ) @@ -444,7 +444,7 @@ ScVbaAxis::setMaximumScale( double _fMaximumScale ) throw (script::BasicErrorExc } } -double SAL_CALL +double SAL_CALL ScVbaAxis::getMaximumScale( ) throw (script::BasicErrorException, uno::RuntimeException) { double fMax = 1.0; @@ -452,7 +452,7 @@ ScVbaAxis::getMaximumScale( ) throw (script::BasicErrorException, uno::RuntimeE { if (isValueAxis()) { - mxPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Max" ))) >>= fMax; + mxPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Max" ))) >>= fMax; } } catch (uno::Exception& ) @@ -463,23 +463,23 @@ ScVbaAxis::getMaximumScale( ) throw (script::BasicErrorException, uno::RuntimeE } -void SAL_CALL +void SAL_CALL ScVbaAxis::setMaximumScaleIsAuto( ::sal_Bool _bMaximumScaleIsAuto ) throw (script::BasicErrorException, uno::RuntimeException) { try { if ( isValueAxis() ) mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "AutoMax" ) ), uno::makeAny( _bMaximumScaleIsAuto )); - + } catch ( uno::Exception& ) { DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString()); - } + } } -::sal_Bool SAL_CALL +::sal_Bool SAL_CALL ScVbaAxis::getMaximumScaleIsAuto( ) throw (script::BasicErrorException, uno::RuntimeException) { sal_Bool bIsAuto = sal_False; @@ -495,7 +495,7 @@ ScVbaAxis::getMaximumScaleIsAuto( ) throw (script::BasicErrorException, uno::Ru return bIsAuto; } -void SAL_CALL +void SAL_CALL ScVbaAxis::setMinimumScale( double _fMinimumScale ) throw (script::BasicErrorException, uno::RuntimeException) { try @@ -509,7 +509,7 @@ ScVbaAxis::setMinimumScale( double _fMinimumScale ) throw (script::BasicErrorExc } } -double SAL_CALL +double SAL_CALL ScVbaAxis::getMinimumScale( ) throw (script::BasicErrorException, uno::RuntimeException) { double fMin = 0.0; @@ -525,7 +525,7 @@ ScVbaAxis::getMinimumScale( ) throw (script::BasicErrorException, uno::RuntimeE return fMin; } -void SAL_CALL +void SAL_CALL ScVbaAxis::setMinimumScaleIsAuto( ::sal_Bool _bMinimumScaleIsAuto ) throw (script::BasicErrorException, uno::RuntimeException) { try @@ -541,7 +541,7 @@ ScVbaAxis::setMinimumScaleIsAuto( ::sal_Bool _bMinimumScaleIsAuto ) throw (scrip } } -::sal_Bool SAL_CALL +::sal_Bool SAL_CALL ScVbaAxis::getMinimumScaleIsAuto( ) throw (script::BasicErrorException, uno::RuntimeException) { sal_Bool bIsAuto = sal_False; @@ -549,7 +549,7 @@ ScVbaAxis::getMinimumScaleIsAuto( ) throw (script::BasicErrorException, uno::Ru { if (isValueAxis()) { - mxPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("AutoMin")) ) >>= bIsAuto; + mxPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("AutoMin")) ) >>= bIsAuto; } } catch (uno::Exception& ) @@ -559,13 +559,13 @@ ScVbaAxis::getMinimumScaleIsAuto( ) throw (script::BasicErrorException, uno::Ru return bIsAuto; } -::sal_Int32 SAL_CALL +::sal_Int32 SAL_CALL ScVbaAxis::getAxisGroup( ) throw (uno::RuntimeException) { return mnGroup; } -void SAL_CALL +void SAL_CALL ScVbaAxis::setScaleType( ::sal_Int32 _nScaleType ) throw (script::BasicErrorException, uno::RuntimeException) { try @@ -592,10 +592,10 @@ ScVbaAxis::setScaleType( ::sal_Int32 _nScaleType ) throw (script::BasicErrorExce } } -::sal_Int32 SAL_CALL +::sal_Int32 SAL_CALL ScVbaAxis::getScaleType( ) throw (script::BasicErrorException, uno::RuntimeException) { - sal_Int32 nScaleType = xlScaleLinear; + sal_Int32 nScaleType = xlScaleLinear; try { if (isValueAxis()) @@ -605,7 +605,7 @@ ScVbaAxis::getScaleType( ) throw (script::BasicErrorException, uno::RuntimeExce if (bisLogarithmic) nScaleType = xlScaleLogarithmic; else - nScaleType = xlScaleLinear; + nScaleType = xlScaleLinear; } } catch (uno::Exception& ) @@ -615,7 +615,7 @@ ScVbaAxis::getScaleType( ) throw (script::BasicErrorException, uno::RuntimeExce return nScaleType; } -double SAL_CALL +double SAL_CALL ScVbaAxis::getHeight( ) throw (css::script::BasicErrorException, css::uno::RuntimeException) { return oShapeHelper->getHeight(); @@ -650,14 +650,14 @@ void SAL_CALL ScVbaAxis::setLeft( double left ) throw (css::script::BasicErrorEx oShapeHelper->setLeft( left ); } -rtl::OUString& +rtl::OUString& ScVbaAxis::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaAxis") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > ScVbaAxis::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sc/source/ui/vba/vbaaxis.hxx b/sc/source/ui/vba/vbaaxis.hxx index f5b22047d1b3..aa42ded186e3 100644 --- a/sc/source/ui/vba/vbaaxis.hxx +++ b/sc/source/ui/vba/vbaaxis.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -41,11 +41,11 @@ class ScVbaAxis : public ScVbaAxis_BASE sal_Int32 mnType; sal_Int32 mnGroup; sal_Int32 mnCrosses; - sal_Bool bCrossesAreCustomized; + sal_Bool bCrossesAreCustomized; ScVbaChart* getChartPtr() throw( css::uno::RuntimeException ); sal_Bool isValueAxis() throw( css::script::BasicErrorException ); std::auto_ptr<ov::ShapeHelper> oShapeHelper; - + public: ScVbaAxis( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet, sal_Int32 _nType, sal_Int32 _nGroup ); // Methods diff --git a/sc/source/ui/vba/vbaaxistitle.cxx b/sc/source/ui/vba/vbaaxistitle.cxx index cc5b0d791b13..2499fa756891 100644 --- a/sc/source/ui/vba/vbaaxistitle.cxx +++ b/sc/source/ui/vba/vbaaxistitle.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -41,7 +41,7 @@ ScVbaAxisTitle::getServiceImplName() return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > ScVbaAxisTitle::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sc/source/ui/vba/vbaaxistitle.hxx b/sc/source/ui/vba/vbaaxistitle.hxx index 0360e40be4aa..4ab2c5e06c90 100644 --- a/sc/source/ui/vba/vbaaxistitle.hxx +++ b/sc/source/ui/vba/vbaaxistitle.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sc/source/ui/vba/vbaborders.cxx b/sc/source/ui/vba/vbaborders.cxx index 7fbe157e2bdf..0cb28dbc6556 100644 --- a/sc/source/ui/vba/vbaborders.cxx +++ b/sc/source/ui/vba/vbaborders.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -62,7 +62,7 @@ class ScVbaBorder : public ScVbaBorder_Base { private: uno::Reference< beans::XPropertySet > m_xProps; - sal_Int32 m_LineType; + sal_Int32 m_LineType; ScVbaPalette m_Palette; bool setBorderLine( table::BorderLine& rBorderLine ) { @@ -79,7 +79,7 @@ private: aTableBorder.IsTopLineValid = sal_True; aTableBorder.TopLine = rBorderLine; break; - + case XlBordersIndex::xlEdgeBottom: aTableBorder.IsBottomLineValid = sal_True; aTableBorder.BottomLine = rBorderLine; @@ -100,13 +100,13 @@ private: case XlBordersIndex::xlDiagonalUp: // #TODO have to ignore at the momement, would be // nice to investigate what we can do here - break; + break; default: return false; } m_xProps->setPropertyValue( sTableBorder, uno::makeAny(aTableBorder) ); return true; - } + } bool getBorderLine( table::BorderLine& rBorderLine ) { @@ -122,7 +122,7 @@ private: if ( aTableBorder.IsTopLineValid ) rBorderLine = aTableBorder.TopLine; break; - + case XlBordersIndex::xlEdgeBottom: if ( aTableBorder.IsBottomLineValid ) rBorderLine = aTableBorder.BottomLine; @@ -144,18 +144,18 @@ private: case XlBordersIndex::xlDiagonalUp: // #TODO have to ignore at the momement, would be // nice to investigate what we can do here - break; + break; default: return false; } return true; - } + } ScVbaBorder(); // no impl -protected: +protected: virtual rtl::OUString& getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaBorder") ); - return sImplName; + return sImplName; } virtual css::uno::Sequence<rtl::OUString> getServiceNames() { @@ -165,17 +165,17 @@ protected: aServiceNames.realloc( 1 ); aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Border" ) ); } - return aServiceNames; + return aServiceNames; } public: - ScVbaBorder( const uno::Reference< beans::XPropertySet > & xProps, const uno::Reference< uno::XComponentContext >& xContext, sal_Int32 lineType, ScVbaPalette& rPalette) : ScVbaBorder_Base( uno::Reference< XHelperInterface >( xProps, uno::UNO_QUERY ), xContext ), m_xProps( xProps ), m_LineType( lineType ), m_Palette( rPalette ) {} + ScVbaBorder( const uno::Reference< beans::XPropertySet > & xProps, const uno::Reference< uno::XComponentContext >& xContext, sal_Int32 lineType, ScVbaPalette& rPalette) : ScVbaBorder_Base( uno::Reference< XHelperInterface >( xProps, uno::UNO_QUERY ), xContext ), m_xProps( xProps ), m_LineType( lineType ), m_Palette( rPalette ) {} // XBorder uno::Any SAL_CALL getColor() throw (uno::RuntimeException) { table::BorderLine aBorderLine; if ( getBorderLine( aBorderLine ) ) - return uno::makeAny( OORGBToXLRGB( aBorderLine.Color ) ); + return uno::makeAny( OORGBToXLRGB( aBorderLine.Color ) ); throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No Implementation available" ) ), uno::Reference< uno::XInterface >() ); } void SAL_CALL setColor( const uno::Any& _color ) throw (uno::RuntimeException) @@ -186,7 +186,7 @@ public: if ( getBorderLine( aBorderLine ) ) { aBorderLine.Color = XLRGBToOORGB( nColor ); - setBorderLine( aBorderLine ); + setBorderLine( aBorderLine ); } else throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No Implementation available" ) ), uno::Reference< uno::XInterface >() ); @@ -204,7 +204,7 @@ public: sal_Int32 nPaletteColor = 0; xIndex->getByIndex( count ) >>= nPaletteColor; if ( nPaletteColor == nColor ) - { + { nIndex = count + 1; break; } @@ -227,16 +227,16 @@ public: { switch ( aBorderLine.OuterLineWidth ) { - case 0: // Thin = default OO thickness - case OOLineThin: + case 0: // Thin = default OO thickness + case OOLineThin: return uno::makeAny( XlBorderWeight::xlThin ); - case OOLineMedium: + case OOLineMedium: return uno::makeAny( XlBorderWeight::xlMedium ); - case OOLineThick: + case OOLineThick: return uno::makeAny( XlBorderWeight::xlThick ); - case OOLineHairline: + case OOLineHairline: return uno::makeAny( XlBorderWeight::xlHairline ); - default: + default: break; } } @@ -251,7 +251,7 @@ public: { switch ( nWeight ) { - case XlBorderWeight::xlThin: + case XlBorderWeight::xlThin: aBorderLine.OuterLineWidth = OOLineThin; break; case XlBorderWeight::xlMedium: @@ -263,7 +263,7 @@ public: case XlBorderWeight::xlHairline: aBorderLine.OuterLineWidth = OOLineHairline; break; - default: + default: throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Bad param" ) ), uno::Reference< uno::XInterface >() ); } setBorderLine( aBorderLine ); @@ -277,7 +277,7 @@ public: // always return xlContinuous; return uno::makeAny( XlLineStyle::xlContinuous ); } - void SAL_CALL setLineStyle( const uno::Any& _linestyle ) throw (uno::RuntimeException) + void SAL_CALL setLineStyle( const uno::Any& _linestyle ) throw (uno::RuntimeException) { // Urk no choice but to silently ignore we don't support this attribute // #TODO would be nice to support the excel line styles @@ -330,14 +330,14 @@ public: RangeBorders( const uno::Reference< table::XCellRange >& xRange, const uno::Reference< uno::XComponentContext > & xContext, ScVbaPalette& rPalette ) : m_xRange( xRange ), m_xContext( xContext ), m_Palette( rPalette ) { } - // XIndexAccess + // XIndexAccess virtual ::sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException) { return SAL_N_ELEMENTS( supportedIndexTable ); } - virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException) + virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException) { - + sal_Int32 nIndex = getTableIndex( Index ); if ( nIndex >= 0 && nIndex < getCount() ) { @@ -356,7 +356,7 @@ public: } }; -uno::Reference< container::XIndexAccess > +uno::Reference< container::XIndexAccess > rangeToBorderIndexAccess( const uno::Reference< table::XCellRange >& xRange, const uno::Reference< uno::XComponentContext > & xContext, ScVbaPalette& rPalette ) { return new RangeBorders( xRange, xContext, rPalette ); @@ -381,11 +381,11 @@ public: } }; -ScVbaBorders::ScVbaBorders( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< table::XCellRange >& xRange, ScVbaPalette& rPalette ): ScVbaBorders_BASE( xParent, xContext, rangeToBorderIndexAccess( xRange ,xContext, rPalette ) ), bRangeIsSingleCell( false ) +ScVbaBorders::ScVbaBorders( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< table::XCellRange >& xRange, ScVbaPalette& rPalette ): ScVbaBorders_BASE( xParent, xContext, rangeToBorderIndexAccess( xRange ,xContext, rPalette ) ), bRangeIsSingleCell( false ) { uno::Reference< table::XColumnRowRange > xColumnRowRange(xRange, uno::UNO_QUERY_THROW ); - if ( xColumnRowRange->getRows()->getCount() == 1 && xColumnRowRange->getColumns()->getCount() == 1 ) - bRangeIsSingleCell = true; + if ( xColumnRowRange->getRows()->getCount() == 1 && xColumnRowRange->getColumns()->getCount() == 1 ) + bRangeIsSingleCell = true; m_xProps.set( xRange, uno::UNO_QUERY_THROW ); } @@ -401,7 +401,7 @@ ScVbaBorders::createCollectionObject( const css::uno::Any& aSource ) return aSource; // its already a Border object } -uno::Type +uno::Type ScVbaBorders::getElementType() throw (uno::RuntimeException) { return excel::XBorders::static_type(0); @@ -476,20 +476,20 @@ void SAL_CALL ScVbaBorders::setColorIndex( const uno::Any& _colorindex ) throw ( bool lcl_areAllLineWidthsSame( const table::TableBorder& maTableBorder, bool bIsCell ) { - + bool bRes = false; - if (bIsCell) + if (bIsCell) { - bRes = ((maTableBorder.TopLine.OuterLineWidth == maTableBorder.BottomLine.OuterLineWidth) && + bRes = ((maTableBorder.TopLine.OuterLineWidth == maTableBorder.BottomLine.OuterLineWidth) && (maTableBorder.TopLine.OuterLineWidth == maTableBorder.LeftLine.OuterLineWidth) && (maTableBorder.TopLine.OuterLineWidth == maTableBorder.RightLine.OuterLineWidth)); } else { - bRes = ((maTableBorder.TopLine.OuterLineWidth == maTableBorder.BottomLine.OuterLineWidth) && -(maTableBorder.TopLine.OuterLineWidth == maTableBorder.LeftLine.OuterLineWidth) && -(maTableBorder.TopLine.OuterLineWidth == maTableBorder.HorizontalLine.OuterLineWidth) && -(maTableBorder.TopLine.OuterLineWidth == maTableBorder.VerticalLine.OuterLineWidth) && + bRes = ((maTableBorder.TopLine.OuterLineWidth == maTableBorder.BottomLine.OuterLineWidth) && +(maTableBorder.TopLine.OuterLineWidth == maTableBorder.LeftLine.OuterLineWidth) && +(maTableBorder.TopLine.OuterLineWidth == maTableBorder.HorizontalLine.OuterLineWidth) && +(maTableBorder.TopLine.OuterLineWidth == maTableBorder.VerticalLine.OuterLineWidth) && (maTableBorder.TopLine.OuterLineWidth == maTableBorder.RightLine.OuterLineWidth)); } return bRes; @@ -504,14 +504,14 @@ uno::Any SAL_CALL ScVbaBorders::getLineStyle() throw (uno::RuntimeException) if ( lcl_areAllLineWidthsSame( maTableBorder, bRangeIsSingleCell )) { - if (maTableBorder.TopLine.LineDistance != 0) + if (maTableBorder.TopLine.LineDistance != 0) { aLinestyle = XlLineStyle::xlDouble; - } + } else if ( maTableBorder.TopLine.OuterLineWidth != 0 ) { aLinestyle = XlLineStyle::xlContinuous; - } + } } return uno::makeAny( aLinestyle ); } @@ -544,7 +544,7 @@ uno::Any SAL_CALL ScVbaBorders::getWeight() throw (uno::RuntimeException) } return weight; } -void SAL_CALL ScVbaBorders::setWeight( const uno::Any& _weight ) throw (uno::RuntimeException) +void SAL_CALL ScVbaBorders::setWeight( const uno::Any& _weight ) throw (uno::RuntimeException) { sal_Int32 count = getCount(); for( sal_Int32 i = 0; i < count ; i++ ) @@ -555,14 +555,14 @@ void SAL_CALL ScVbaBorders::setWeight( const uno::Any& _weight ) throw (uno::Run } -rtl::OUString& +rtl::OUString& ScVbaBorders::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaBorders") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > ScVbaBorders::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sc/source/ui/vba/vbaborders.hxx b/sc/source/ui/vba/vbaborders.hxx index 0164328a9e83..d6784691c488 100644 --- a/sc/source/ui/vba/vbaborders.hxx +++ b/sc/source/ui/vba/vbaborders.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -35,7 +35,7 @@ #include <com/sun/star/table/XCellRange.hpp> #include <com/sun/star/beans/XPropertySet.hpp> - + #include <vbahelper/vbacollectionimpl.hxx> typedef CollTestImplHelper< ov::excel::XBorders > ScVbaBorders_BASE; @@ -57,9 +57,9 @@ public: // XBorders - // ScVbaCollectionBaseImpl - virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); - + // ScVbaCollectionBaseImpl + virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); + virtual css::uno::Any SAL_CALL getColor() throw (css::uno::RuntimeException); virtual void SAL_CALL setColor( const css::uno::Any& _color ) throw (css::uno::RuntimeException); virtual css::uno::Any SAL_CALL getColorIndex() throw (css::uno::RuntimeException); @@ -68,7 +68,7 @@ public: virtual void SAL_CALL setLineStyle( const css::uno::Any& _linestyle ) throw (css::uno::RuntimeException); virtual css::uno::Any SAL_CALL getWeight() throw (css::uno::RuntimeException); virtual void SAL_CALL setWeight( const css::uno::Any& ) throw (css::uno::RuntimeException); - // xxxxBASE + // xxxxBASE virtual rtl::OUString& getServiceImplName(); virtual css::uno::Sequence<rtl::OUString> getServiceNames(); }; diff --git a/sc/source/ui/vba/vbacharacters.cxx b/sc/source/ui/vba/vbacharacters.cxx index 011b0a4a72e1..5d12facad12b 100644 --- a/sc/source/ui/vba/vbacharacters.cxx +++ b/sc/source/ui/vba/vbacharacters.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -40,7 +40,7 @@ ScVbaCharacters::ScVbaCharacters( const uno::Reference< XHelperInterface >& xPar if ( nStart < 1 ) nStart = 1; // silently correct user error ( as ms ) nStart--; // OOo is 0 based - Length >>=nLength; + Length >>=nLength; uno::Reference< text::XTextCursor > xTextCursor( m_xSimpleText->createTextCursor(), uno::UNO_QUERY_THROW ); xTextCursor->collapseToStart(); if ( nStart ) @@ -58,41 +58,41 @@ ScVbaCharacters::ScVbaCharacters( const uno::Reference< XHelperInterface >& xPar } -::rtl::OUString SAL_CALL +::rtl::OUString SAL_CALL ScVbaCharacters::getCaption() throw (css::uno::RuntimeException) { return m_xTextRange->getString(); } -void SAL_CALL +void SAL_CALL ScVbaCharacters::setCaption( const ::rtl::OUString& _caption ) throw (css::uno::RuntimeException) { m_xTextRange->setString( _caption ); } -::sal_Int32 SAL_CALL +::sal_Int32 SAL_CALL ScVbaCharacters::getCount() throw (css::uno::RuntimeException) { - return getCaption().getLength(); + return getCaption().getLength(); } -::rtl::OUString SAL_CALL +::rtl::OUString SAL_CALL ScVbaCharacters::getText() throw (css::uno::RuntimeException) { return getCaption(); } -void SAL_CALL +void SAL_CALL ScVbaCharacters::setText( const ::rtl::OUString& _text ) throw (css::uno::RuntimeException) { setCaption( _text ); } -uno::Reference< excel::XFont > SAL_CALL -ScVbaCharacters::getFont() throw (css::uno::RuntimeException) +uno::Reference< excel::XFont > SAL_CALL +ScVbaCharacters::getFont() throw (css::uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( m_xTextRange, uno::UNO_QUERY_THROW ); return uno::Reference< excel::XFont >( new ScVbaFont( this, mxContext, m_aPalette, xProps ) ); } -void SAL_CALL +void SAL_CALL ScVbaCharacters::setFont( const uno::Reference< excel::XFont >& /*_font*/ ) throw (css::uno::RuntimeException) { // #TODO #FIXME needs implementation, or can't be done? @@ -101,29 +101,29 @@ ScVbaCharacters::setFont( const uno::Reference< excel::XFont >& /*_font*/ ) thro // Methods -void SAL_CALL +void SAL_CALL ScVbaCharacters::Insert( const ::rtl::OUString& String ) throw (css::uno::RuntimeException) { m_xSimpleText->insertString( m_xTextRange, String, bReplace ); } -void SAL_CALL +void SAL_CALL ScVbaCharacters::Delete( ) throw (css::uno::RuntimeException) { - // #FIXME #TODO is this a bit suspect?, I wonder should the contents + // #FIXME #TODO is this a bit suspect?, I wonder should the contents // of the cell be deleted from the parent ( range ) - m_xSimpleText->setString(rtl::OUString()); + m_xSimpleText->setString(rtl::OUString()); } -rtl::OUString& +rtl::OUString& ScVbaCharacters::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaCharacters") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > ScVbaCharacters::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sc/source/ui/vba/vbacharacters.hxx b/sc/source/ui/vba/vbacharacters.hxx index df2fcf348619..a0a6c350282c 100644 --- a/sc/source/ui/vba/vbacharacters.hxx +++ b/sc/source/ui/vba/vbacharacters.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sc/source/ui/vba/vbachart.cxx b/sc/source/ui/vba/vbachart.cxx index 705f79ed42f9..fb02586e62f5 100644 --- a/sc/source/ui/vba/vbachart.cxx +++ b/sc/source/ui/vba/vbachart.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -87,7 +87,7 @@ ScVbaChart::ScVbaChart( const css::uno::Reference< ov::XHelperInterface >& _xPar mxChartPropertySet.set( _xChartComponent, uno::UNO_QUERY_THROW ) ; } -::rtl::OUString SAL_CALL +::rtl::OUString SAL_CALL ScVbaChart::getName() throw (css::uno::RuntimeException) { rtl::OUString sName; @@ -108,7 +108,7 @@ ScVbaChart::SeriesCollection(const uno::Any&) throw (uno::RuntimeException) return uno::Any(); } -::sal_Int32 SAL_CALL +::sal_Int32 SAL_CALL ScVbaChart::getChartType() throw ( uno::RuntimeException, script::BasicErrorException) { sal_Int32 nChartType = -1; @@ -136,7 +136,7 @@ ScVbaChart::getChartType() throw ( uno::RuntimeException, script::BasicErrorExce else if (sDiagramType.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart.BarDiagram")))) { sal_Int32 nSolidType = chart::ChartSolidType::RECTANGULAR_SOLID; - if (mxDiagramPropertySet->getPropertySetInfo()->hasPropertyByName(SOLIDTYPE)) + if (mxDiagramPropertySet->getPropertySetInfo()->hasPropertyByName(SOLIDTYPE)) { //in 2D diagrams 'SolidType' may not be set if (is3D()) mxDiagramPropertySet->getPropertyValue(SOLIDTYPE) >>= nSolidType; @@ -227,7 +227,7 @@ ScVbaChart::getChartType() throw ( uno::RuntimeException, script::BasicErrorExce return nChartType; } -void SAL_CALL +void SAL_CALL ScVbaChart::setChartType( ::sal_Int32 _nChartType ) throw ( uno::RuntimeException, script::BasicErrorException) { try @@ -303,7 +303,7 @@ try mxDiagramPropertySet->setPropertyValue( UPDOWN, uno::makeAny(sal_Bool((_nChartType == xlStockOHLC) || (_nChartType == xlStockVOHLC)))); mxDiagramPropertySet->setPropertyValue(VOLUME, uno::makeAny(sal_Bool((_nChartType == xlStockVHLC) || (_nChartType == xlStockVOHLC)))); break; - + case xlPieOfPie: // not possible case xlPieExploded: // SegmentOffset an ChartDataPointProperties ->am XDiagram abholen //wie macht Excel das? case xl3DPieExploded: @@ -312,7 +312,7 @@ try case xlBarOfPie: // not possible (Zoom pie) setDiagram( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart.PieDiagram"))); break; - + case xlRadar: case xlRadarMarkers: case xlRadarFilled: @@ -348,8 +348,8 @@ try default: throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), SbERR_CONVERSION, rtl::OUString() ); } - - switch (_nChartType) + + switch (_nChartType) { case xlLineMarkers: case xlLineMarkersStacked: @@ -459,7 +459,7 @@ try } break; } - + switch (_nChartType) { case xlColumnStacked: @@ -501,7 +501,7 @@ try mxDiagramPropertySet->setPropertyValue(STACKED, uno::makeAny( sal_False)); break; } - switch (_nChartType) + switch (_nChartType) { case xl3DArea: case xl3DAreaStacked: @@ -568,7 +568,7 @@ ScVbaChart::Activate() throw (script::BasicErrorException, uno::RuntimeException throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), SbERR_METHOD_FAILED, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "no ChartObject as parent" ) ) ); } -void SAL_CALL +void SAL_CALL ScVbaChart::setSourceData( const css::uno::Reference< ::ooo::vba::excel::XRange >& _xCalcRange, const css::uno::Any& _aPlotBy ) throw (css::script::BasicErrorException, css::uno::RuntimeException) { try @@ -636,7 +636,7 @@ ScVbaChart::setSourceData( const css::uno::Reference< ::ooo::vba::excel::XRange } } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > ScVbaChart::getDefaultSeriesDescriptions( sal_Int32 _nCount ) { uno::Sequence< rtl::OUString > sDescriptions ( _nCount ); @@ -676,10 +676,10 @@ ScVbaChart::setPlotBy( ::sal_Int32 _nPlotBy ) throw (css::script::BasicErrorExce catch (uno::Exception& ) { throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), SbERR_METHOD_FAILED, rtl::OUString() ); - } + } } -::sal_Int32 SAL_CALL +::sal_Int32 SAL_CALL ScVbaChart::getPlotBy( ) throw (script::BasicErrorException, uno::RuntimeException) { try @@ -698,7 +698,7 @@ ScVbaChart::getPlotBy( ) throw (script::BasicErrorException, uno::RuntimeExcept catch (uno::Exception& ) { throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), SbERR_METHOD_FAILED, rtl::OUString() ); - } + } } void @@ -719,23 +719,23 @@ ScVbaChart::setDiagram( const rtl::OUString& _sDiagramType ) throw( script::Basi // #TODO find out why we have Location/getLocation ? there is afaiks no // Location property, just a Location function for the Chart object -sal_Int32 SAL_CALL +sal_Int32 SAL_CALL ScVbaChart::Location() throw (css::script::BasicErrorException, css::uno::RuntimeException) { - return getLocation(); + return getLocation(); } -sal_Int32 SAL_CALL +sal_Int32 SAL_CALL ScVbaChart::getLocation() throw (css::script::BasicErrorException, css::uno::RuntimeException) { return -1; } -void SAL_CALL +void SAL_CALL ScVbaChart::setLocation( ::sal_Int32 /*where*/, const css::uno::Any& /*Name*/ ) throw (script::BasicErrorException, uno::RuntimeException) { // Helper api just stubs out the code <shrug> - // #TODO come back and make sense out of this + // #TODO come back and make sense out of this // String sheetName = null; // // if ((name != null) && name instanceof String) { @@ -819,7 +819,7 @@ ScVbaChart::setLocation( ::sal_Int32 /*where*/, const css::uno::Any& /*Name*/ ) } -sal_Bool SAL_CALL +sal_Bool SAL_CALL ScVbaChart::getHasTitle( ) throw (script::BasicErrorException, uno::RuntimeException) { sal_Bool bHasTitle = sal_False; @@ -834,7 +834,7 @@ ScVbaChart::getHasTitle( ) throw (script::BasicErrorException, uno::RuntimeExce return bHasTitle; } -void SAL_CALL +void SAL_CALL ScVbaChart::setHasTitle( ::sal_Bool bTitle ) throw (script::BasicErrorException, uno::RuntimeException) { try @@ -845,10 +845,10 @@ ScVbaChart::setHasTitle( ::sal_Bool bTitle ) throw (script::BasicErrorException, { throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), SbERR_METHOD_FAILED, rtl::OUString() ); } - + } -::sal_Bool SAL_CALL +::sal_Bool SAL_CALL ScVbaChart::getHasLegend( ) throw (script::BasicErrorException, uno::RuntimeException) { sal_Bool bHasLegend = sal_False; @@ -863,7 +863,7 @@ ScVbaChart::getHasLegend( ) throw (script::BasicErrorException, uno::RuntimeExc return bHasLegend; } -void SAL_CALL +void SAL_CALL ScVbaChart::setHasLegend( ::sal_Bool bLegend ) throw (script::BasicErrorException, uno::RuntimeException) { try @@ -876,15 +876,15 @@ ScVbaChart::setHasLegend( ::sal_Bool bLegend ) throw (script::BasicErrorExceptio } } -uno::Reference< excel::XChartTitle > SAL_CALL +uno::Reference< excel::XChartTitle > SAL_CALL ScVbaChart::getChartTitle( ) throw (script::BasicErrorException, uno::RuntimeException) { uno::Reference< drawing::XShape > xTitleShape = mxChartDocument->getTitle(); // #TODO check parent - return new ScVbaChartTitle(this, mxContext, xTitleShape); + return new ScVbaChartTitle(this, mxContext, xTitleShape); } -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaChart::Axes( const uno::Any& Type, const uno::Any& AxisGroup ) throw (script::BasicErrorException, uno::RuntimeException) { // mmm chart probably is the parent, #TODO check parent @@ -900,7 +900,7 @@ ScVbaChart::is3D() throw ( uno::RuntimeException ) sal_Bool is3d = sal_False; mxDiagramPropertySet->getPropertyValue(DIM3D) >>= is3d; return is3d; -} +} sal_Int32 ScVbaChart::getStackedType( sal_Int32 _nStacked, sal_Int32 _n100PercentStacked, sal_Int32 _nUnStacked ) throw ( uno::RuntimeException ) @@ -935,7 +935,7 @@ ScVbaChart::is100PercentStacked() throw ( uno::RuntimeException ) return b100Percent; } -sal_Int32 +sal_Int32 ScVbaChart::getSolidType(sal_Int32 _nDeep, sal_Int32 _nVertiStacked, sal_Int32 _nVerti100PercentStacked, sal_Int32 _nVertiUnStacked, sal_Int32 _nHoriStacked, sal_Int32 _nHori100PercentStacked, sal_Int32 _nHoriUnStacked) throw ( script::BasicErrorException ) { sal_Bool bIsVertical = true; @@ -968,7 +968,7 @@ ScVbaChart::getSolidType(sal_Int32 _nDeep, sal_Int32 _nVertiStacked, sal_Int32 _ } -sal_Int32 +sal_Int32 ScVbaChart::getStockUpDownValue(sal_Int32 _nUpDown, sal_Int32 _nNotUpDown) throw (script::BasicErrorException) { sal_Bool bUpDown = sal_False; @@ -987,12 +987,12 @@ ScVbaChart::getStockUpDownValue(sal_Int32 _nUpDown, sal_Int32 _nNotUpDown) throw catch (uno::Exception& ) { rtl::OUString aTemp; // temporary needed for g++ 3.3.5 - script::BasicErrorException( aTemp, uno::Reference< uno::XInterface >(), SbERR_METHOD_FAILED, rtl::OUString() ); + script::BasicErrorException( aTemp, uno::Reference< uno::XInterface >(), SbERR_METHOD_FAILED, rtl::OUString() ); } return _nNotUpDown; } -bool +bool ScVbaChart::hasMarkers() throw ( script::BasicErrorException ) { bool bHasMarkers = false; @@ -1005,12 +1005,12 @@ ScVbaChart::hasMarkers() throw ( script::BasicErrorException ) catch ( uno::Exception& ) { rtl::OUString aTemp; // temporary needed for g++ 3.3.5 - script::BasicErrorException( aTemp, uno::Reference< uno::XInterface >(), SbERR_METHOD_FAILED, rtl::OUString() ); + script::BasicErrorException( aTemp, uno::Reference< uno::XInterface >(), SbERR_METHOD_FAILED, rtl::OUString() ); } return bHasMarkers; } -sal_Int32 +sal_Int32 ScVbaChart::getMarkerType(sal_Int32 _nWithMarkers, sal_Int32 _nWithoutMarkers) throw ( script::BasicErrorException ) { if (hasMarkers()) @@ -1018,7 +1018,7 @@ ScVbaChart::getMarkerType(sal_Int32 _nWithMarkers, sal_Int32 _nWithoutMarkers) t return _nWithoutMarkers; } -void +void ScVbaChart::assignDiagramAttributes() { xAxisXSupplier.set( mxDiagramPropertySet, uno::UNO_QUERY_THROW ); @@ -1050,8 +1050,8 @@ ScVbaChart::isSeriesIndexValid(sal_Int32 _seriesindex) throw( script::BasicError bret = true; } } - } - catch (uno::Exception& ) + } + catch (uno::Exception& ) { throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), SbERR_METHOD_FAILED, rtl::OUString() ); } @@ -1094,9 +1094,9 @@ ScVbaChart::setSeriesName(sal_Int32 _index, rtl::OUString _sname) throw ( script } } -sal_Int32 +sal_Int32 ScVbaChart::getSeriesCount() throw ( script::BasicErrorException ) -{ +{ uno::Reference< chart::XChartDataArray > xChartDataArray( mxChartDocument->getData(), uno::UNO_QUERY_THROW ); if (getPlotBy() == xlRows) @@ -1119,10 +1119,10 @@ ScVbaChart::getSeriesName(sal_Int32 _index) throw ( script::BasicErrorException sDescriptions = xChartDataArray->getColumnDescriptions(); sName = sDescriptions[_index]; } - return sName; + return sName; } -double +double ScVbaChart::getValue(sal_Int32 _seriesindex, sal_Int32 _valindex) throw ( script::BasicErrorException ) { double result = -1.0; @@ -1136,7 +1136,7 @@ ScVbaChart::getValue(sal_Int32 _seriesindex, sal_Int32 _valindex) throw ( script return result; } -sal_Int32 +sal_Int32 ScVbaChart::getValuesCount(sal_Int32 _seriesIndex) throw ( script::BasicErrorException ) { sal_Int32 nCount = 0; @@ -1149,11 +1149,11 @@ ScVbaChart::getValuesCount(sal_Int32 _seriesIndex) throw ( script::BasicErrorExc else nCount = dblValues.getLength(); } - return nCount; + return nCount; } -uno::Reference< excel::XDataLabels > +uno::Reference< excel::XDataLabels > ScVbaChart::DataLabels( const uno::Reference< ov::excel::XSeries > /*_oSeries*/ ) throw ( css::script::BasicErrorException ) { if ( true ) @@ -1162,7 +1162,7 @@ ScVbaChart::DataLabels( const uno::Reference< ov::excel::XSeries > /*_oSeries*/ return uno::Reference< excel::XDataLabels > (); } -bool +bool ScVbaChart::getHasDataCaption( const uno::Reference< css::beans::XPropertySet >& _xPropertySet )throw ( script::BasicErrorException ) { bool bResult = false; @@ -1171,15 +1171,15 @@ ScVbaChart::getHasDataCaption( const uno::Reference< css::beans::XPropertySet >& sal_Int32 nChartDataCaption = 0; _xPropertySet->getPropertyValue(DATACAPTION) >>= nChartDataCaption; bResult = (nChartDataCaption != chart::ChartDataCaption::NONE); - } - catch (uno::Exception& ) + } + catch (uno::Exception& ) { throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), SbERR_METHOD_FAILED, rtl::OUString() ); } return bResult; } -void +void ScVbaChart::setHasDataCaption( const uno::Reference< beans::XPropertySet >& _xPropertySet, bool _bHasDataLabels )throw ( script::BasicErrorException ) { try @@ -1188,14 +1188,14 @@ ScVbaChart::setHasDataCaption( const uno::Reference< beans::XPropertySet >& _xPr _xPropertySet->setPropertyValue(DATACAPTION, uno::makeAny ( chart::ChartDataCaption::VALUE) ); else _xPropertySet->setPropertyValue(DATACAPTION, uno::makeAny ( chart::ChartDataCaption::NONE) ); - } - catch (uno::Exception& ) + } + catch (uno::Exception& ) { throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), SbERR_METHOD_FAILED, rtl::OUString() ); } } -uno::Reference< beans::XPropertySet > +uno::Reference< beans::XPropertySet > ScVbaChart::getAxisPropertySet(sal_Int32 _nAxisType, sal_Int32 _nAxisGroup) throw ( script::BasicErrorException ) { assignDiagramAttributes(); @@ -1227,7 +1227,7 @@ ScVbaChart::getAxisPropertySet(sal_Int32 _nAxisType, sal_Int32 _nAxisGroup) thro xAxisProps = xTwoAxisYSupplier->getSecondaryYAxis(); break; default: - return xAxisProps; + return xAxisProps; } return xAxisProps; } @@ -1240,7 +1240,7 @@ ScVbaChart::getServiceImplName() return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > ScVbaChart::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sc/source/ui/vba/vbachart.hxx b/sc/source/ui/vba/vbachart.hxx index a0cee5d04a29..3602baafaa64 100644 --- a/sc/source/ui/vba/vbachart.hxx +++ b/sc/source/ui/vba/vbachart.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -44,7 +44,7 @@ typedef InheritedHelperInterfaceImpl1<ov::excel::XChart > ChartImpl_BASE; class ScVbaChart : public ChartImpl_BASE -{ +{ friend class ScVbaAxis; css::uno::Reference< css::chart::XChartDocument > mxChartDocument; @@ -67,7 +67,7 @@ friend class ScVbaAxis; sal_Int32 getSolidType(sal_Int32 _nDeep, sal_Int32 _nVertiStacked, sal_Int32 _nVerti100PercentStacked, sal_Int32 _nVertiUnStacked, sal_Int32 _nHoriStacked, sal_Int32 _nHori100PercentStacked, sal_Int32 _nHoriUnStacked) throw ( css::script::BasicErrorException ); sal_Int32 getStockUpDownValue(sal_Int32 _nUpDown, sal_Int32 _nNotUpDown) throw (css::script::BasicErrorException); bool hasMarkers() throw ( css::script::BasicErrorException ); - sal_Int32 getMarkerType(sal_Int32 _nWithMarkers, sal_Int32 _nWithoutMarkers) throw ( css::script::BasicErrorException ); + sal_Int32 getMarkerType(sal_Int32 _nWithMarkers, sal_Int32 _nWithoutMarkers) throw ( css::script::BasicErrorException ); void assignDiagramAttributes(); void setDefaultSeriesDescriptionLabels(){} public: @@ -93,7 +93,7 @@ public: virtual css::uno::Any SAL_CALL SeriesCollection(const css::uno::Any&) throw (css::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getChartType() throw ( css::uno::RuntimeException, css::script::BasicErrorException); virtual void SAL_CALL setChartType( ::sal_Int32 _charttype ) throw ( css::uno::RuntimeException, css::script::BasicErrorException); - virtual void SAL_CALL Activate( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); + virtual void SAL_CALL Activate( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); virtual void SAL_CALL setSourceData( const css::uno::Reference< ::ooo::vba::excel::XRange >& range, const css::uno::Any& PlotBy ) throw (css::script::BasicErrorException, css::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL Location( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getLocation( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); diff --git a/sc/source/ui/vba/vbachartobject.cxx b/sc/source/ui/vba/vbachartobject.cxx index eaa42d1cc309..839b7cf27cc0 100644 --- a/sc/source/ui/vba/vbachartobject.cxx +++ b/sc/source/ui/vba/vbachartobject.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,7 +42,7 @@ const rtl::OUString PERSIST_NAME( RTL_CONSTASCII_USTRINGPARAM("PersistName") ); ScVbaChartObject::ScVbaChartObject( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::table::XTableChart >& _xTableChart, const css::uno::Reference< css::drawing::XDrawPageSupplier >& _xDrawPageSupplier ) : ChartObjectImpl_BASE( _xParent, _xContext ), xTableChart( _xTableChart ), xDrawPageSupplier( _xDrawPageSupplier ) { - xDrawPage = xDrawPageSupplier->getDrawPage(); + xDrawPage = xDrawPageSupplier->getDrawPage(); xEmbeddedObjectSupplier.set( xTableChart, uno::UNO_QUERY_THROW ); xNamed.set( xTableChart, uno::UNO_QUERY_THROW ); sPersistName = getPersistName(); @@ -58,7 +58,7 @@ rtl::OUString ScVbaChartObject::getPersistName() return sPersistName; } -uno::Reference< drawing::XShape > +uno::Reference< drawing::XShape > ScVbaChartObject::setShape() throw ( script::BasicErrorException ) { try @@ -87,14 +87,14 @@ ScVbaChartObject::setShape() throw ( script::BasicErrorException ) return NULL; } -void SAL_CALL +void SAL_CALL ScVbaChartObject::setName( const rtl::OUString& sName ) throw (css::uno::RuntimeException) { xNamedShape->setName(sName); } -::rtl::OUString SAL_CALL +::rtl::OUString SAL_CALL ScVbaChartObject::getName() throw (css::uno::RuntimeException) { return xNamedShape->getName(); @@ -107,19 +107,19 @@ ScVbaChartObject::Delete() throw ( css::script::BasicErrorException ) uno::Reference< excel::XWorksheet > xParent( getParent(), uno::UNO_QUERY_THROW ); uno::Reference< excel::XChartObjects > xColl( xParent->ChartObjects( uno::Any() ), uno::UNO_QUERY_THROW ); ScVbaChartObjects* pChartObjectsImpl = static_cast< ScVbaChartObjects* >( xColl.get() ); - if (pChartObjectsImpl) + if (pChartObjectsImpl) pChartObjectsImpl->removeByName( getPersistName() ); - else + else throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), SbERR_METHOD_FAILED, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Parent is not ChartObjects" ) ) ); } - -void + +void ScVbaChartObject::Activate() throw ( script::BasicErrorException ) { try { // #TODO #FIXME should be ThisWorkbook or equivelant, or in - // fact probably the chart object should be created with + // fact probably the chart object should be created with // the XModel owner //uno::Reference< view::XSelectionSupplier > xSelectionSupplier( getXModel().getCurrentController()); uno::Reference< view::XSelectionSupplier > xSelectionSupplier( getCurrentExcelDoc(mxContext)->getCurrentController(), uno::UNO_QUERY_THROW ); @@ -131,20 +131,20 @@ ScVbaChartObject::Activate() throw ( script::BasicErrorException ) } } -uno::Reference< excel::XChart > SAL_CALL +uno::Reference< excel::XChart > SAL_CALL ScVbaChartObject::getChart() throw (css::uno::RuntimeException) { return new ScVbaChart( this, mxContext, xEmbeddedObjectSupplier->getEmbeddedObject(), xTableChart ); } -rtl::OUString& +rtl::OUString& ScVbaChartObject::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaChartObject") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > ScVbaChartObject::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; @@ -156,56 +156,56 @@ ScVbaChartObject::getServiceNames() return aServiceNames; } -double +double ScVbaChartObject::getHeight() { return oShapeHelper->getHeight(); } -void +void ScVbaChartObject::setHeight(double _fheight) throw ( script::BasicErrorException ) { oShapeHelper->setHeight(_fheight); } - -double + +double ScVbaChartObject::getWidth() { return oShapeHelper->getWidth(); } -void +void ScVbaChartObject::setWidth(double _fWidth) throw ( script::BasicErrorException ) { oShapeHelper->setWidth(_fWidth); } - -double + +double ScVbaChartObject::getLeft() { return oShapeHelper->getLeft(); } -void +void ScVbaChartObject::setLeft(double _fLeft) { oShapeHelper->setLeft(_fLeft); } - -double + +double ScVbaChartObject::getTop() { return oShapeHelper->getTop(); -} +} -void +void ScVbaChartObject::setTop(double _fTop) { oShapeHelper->setTop(_fTop); } -uno::Reference< uno::XInterface > -ScVbaChartObject::getUnoObject() throw (script::BasicErrorException) +uno::Reference< uno::XInterface > +ScVbaChartObject::getUnoObject() throw (script::BasicErrorException) { return uno::Reference< uno::XInterface >( xShape, uno::UNO_QUERY ); } diff --git a/sc/source/ui/vba/vbachartobject.hxx b/sc/source/ui/vba/vbachartobject.hxx index 73aa3d1fe119..4e995d98a9fa 100644 --- a/sc/source/ui/vba/vbachartobject.hxx +++ b/sc/source/ui/vba/vbachartobject.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -40,7 +40,7 @@ typedef InheritedHelperInterfaceImpl1<ov::excel::XChartObject > ChartObjectImpl_BASE; class ScVbaChartObject : public ChartObjectImpl_BASE -{ +{ css::uno::Reference< css::table::XTableChart > xTableChart; css::uno::Reference< css::document::XEmbeddedObjectSupplier > xEmbeddedObjectSupplier; @@ -59,8 +59,8 @@ public: virtual ::rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException); virtual void SAL_CALL setName( const ::rtl::OUString& sName ) throw (css::uno::RuntimeException); virtual css::uno::Reference< ov::excel::XChart > SAL_CALL getChart() throw (css::uno::RuntimeException); - virtual void SAL_CALL Delete() throw ( css::script::BasicErrorException ); - virtual void Activate() throw ( css::script::BasicErrorException ); + virtual void SAL_CALL Delete() throw ( css::script::BasicErrorException ); + virtual void Activate() throw ( css::script::BasicErrorException ); // XHelperInterface virtual rtl::OUString& getServiceImplName(); virtual css::uno::Sequence<rtl::OUString> getServiceNames(); diff --git a/sc/source/ui/vba/vbachartobjects.cxx b/sc/source/ui/vba/vbachartobjects.cxx index b8706b233462..ff97462b1b56 100644 --- a/sc/source/ui/vba/vbachartobjects.cxx +++ b/sc/source/ui/vba/vbachartobjects.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -48,12 +48,12 @@ using namespace ::ooo::vba; class ChartObjectEnumerationImpl : public EnumerationHelperImpl { uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier; - + public: ChartObjectEnumerationImpl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< drawing::XDrawPageSupplier >& _xDrawPageSupplier, const uno::Reference< XHelperInterface >& _xParent ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( _xParent, xContext, xEnumeration ), xDrawPageSupplier( _xDrawPageSupplier ) {} - virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) - { + virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) + { uno::Reference< table::XTableChart > xTableChart( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW ); // parent Object is sheet return uno::makeAny( uno::Reference< excel::XChartObject > ( new ScVbaChartObject( m_xParent, m_xContext, xTableChart, xDrawPageSupplier ) ) ); @@ -84,10 +84,10 @@ ScVbaChartObjects::getChartObjectNames() throw( css::script::BasicErrorException ScDocShell* pDocShell = NULL; if ( !pUno ) throw uno::RuntimeException( rtl::OUString::createFromAscii("Failed to obtain the impl class from the drawpage"), uno::Reference< uno::XInterface >() ); - pDocShell = pUno->GetDocShell(); + pDocShell = pUno->GetDocShell(); if ( !pDocShell ) throw uno::RuntimeException( rtl::OUString::createFromAscii("Failed to obtain the docshell implclass"), uno::Reference< uno::XInterface >() ); - + uno::Reference< sheet::XSpreadsheetDocument > xSpreadsheetDocument( pDocShell->GetModel(), uno::UNO_QUERY_THROW ); uno::Reference< sheet::XSpreadsheets > xSpreadsheets = xSpreadsheetDocument->getSheets(); std::vector< rtl::OUString > aChartNamesVector; @@ -107,8 +107,8 @@ ScVbaChartObjects::getChartObjectNames() throw( css::script::BasicErrorException std::vector< rtl::OUString > ::const_iterator it_end = aChartNamesVector.end(); for ( sal_Int32 index = 0 ; it != it_end; ++it, ++index ) sChartNames[index] = *it; - } - catch (uno::Exception& ) + } + catch (uno::Exception& ) { throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), SbERR_METHOD_FAILED, rtl::OUString() ); } @@ -116,25 +116,25 @@ ScVbaChartObjects::getChartObjectNames() throw( css::script::BasicErrorException } // XChartObjects -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaChartObjects::Add( double _nX, double _nY, double _nWidth, double _nHeight ) throw (script::BasicErrorException) { - try + try { uno::Sequence< table::CellRangeAddress > aCellRangeAddress( 1 ); awt::Rectangle aRectangle; aRectangle.X = Millimeter::getInHundredthsOfOneMillimeter(_nX); aRectangle.Y = Millimeter::getInHundredthsOfOneMillimeter(_nY); aRectangle.Width = Millimeter::getInHundredthsOfOneMillimeter(_nWidth); - aRectangle.Height = Millimeter::getInHundredthsOfOneMillimeter(_nHeight); + aRectangle.Height = Millimeter::getInHundredthsOfOneMillimeter(_nHeight); // Note the space at the end of the stem ("Chart "). In ChartSheets only "Chart" is the stem rtl::OUString sPersistChartName = ContainerUtilities::getUniqueName( getChartObjectNames(), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Chart " ) ) , rtl::OUString(), 1); xTableCharts->addNewByName(sPersistChartName, aRectangle, aCellRangeAddress, true, false ); - uno::Reference< excel::XChartObject > xChartObject( getItemByStringIndex( sPersistChartName ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XChartObject > xChartObject( getItemByStringIndex( sPersistChartName ), uno::UNO_QUERY_THROW ); xChartObject->getChart()->setChartType(excel::XlChartType::xlColumnClustered); return uno::makeAny( xChartObject ); - } - catch ( uno::Exception& ex) + } + catch ( uno::Exception& ex) { OSL_TRACE("AddItem caught exception ->%s", rtl::OUStringToOString( ex.Message, RTL_TEXTENCODING_UTF8 ).getStr() ); } @@ -159,7 +159,7 @@ ScVbaChartObjects::createEnumeration() throw (uno::RuntimeException) // XElementAccess -uno::Type +uno::Type ScVbaChartObjects::getElementType() throw (uno::RuntimeException) { return excel::XChartObject::static_type(0); @@ -168,20 +168,20 @@ ScVbaChartObjects::getElementType() throw (uno::RuntimeException) // ScVbaCollectionBaseImpl uno::Any ScVbaChartObjects::createCollectionObject( const css::uno::Any& aSource ) -{ +{ uno::Reference< table::XTableChart > xTableChart( aSource, uno::UNO_QUERY_THROW ); // correct parent object is sheet return uno::makeAny( uno::Reference< excel::XChartObject > ( new ScVbaChartObject( getParent(), mxContext, xTableChart, xDrawPageSupplier ) ) ); } -rtl::OUString& +rtl::OUString& ScVbaChartObjects::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaChartObjects") ); return sImplName; } -css::uno::Sequence<rtl::OUString> +css::uno::Sequence<rtl::OUString> ScVbaChartObjects::getServiceNames() { static uno::Sequence< rtl::OUString > sNames; diff --git a/sc/source/ui/vba/vbachartobjects.hxx b/sc/source/ui/vba/vbachartobjects.hxx index 3524c8ffe30e..232b07401b90 100644 --- a/sc/source/ui/vba/vbachartobjects.hxx +++ b/sc/source/ui/vba/vbachartobjects.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -40,14 +40,14 @@ typedef CollTestImplHelper< ov::excel::XChartObjects > ChartObjects_BASE; /* #TODO see if this hash table is 'really' necessary -typedef ::std::hash_map< ::rtl::OUString, +typedef ::std::hash_map< ::rtl::OUString, css::uno::Reference< ov::excel::XChartObject >, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > aHashTable; */ class ScVbaChartObjects : public ChartObjects_BASE -{ +{ css::uno::Reference< css::table::XTableCharts > xTableCharts; css::uno::Reference< css::drawing::XDrawPageSupplier > xDrawPageSupplier; @@ -66,8 +66,8 @@ public: virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException); // XElementAccess virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException); - // ScVbaCollectionBaseImpl - virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); + // ScVbaCollectionBaseImpl + virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); // ChartObjects_BASE virtual rtl::OUString& getServiceImplName(); virtual css::uno::Sequence<rtl::OUString> getServiceNames(); diff --git a/sc/source/ui/vba/vbacharts.cxx b/sc/source/ui/vba/vbacharts.cxx index d02e79e8d431..d9a720dc3dd1 100644 --- a/sc/source/ui/vba/vbacharts.cxx +++ b/sc/source/ui/vba/vbacharts.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -39,33 +39,33 @@ ScVbaCharts::ScVbaCharts( const css::uno::Reference< ov::XHelperInterface >& _xP xSpreadsheetDocument.set( xComponent, uno::UNO_QUERY_THROW ); } -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaCharts::Add() throw (css::script::BasicErrorException, css::uno::RuntimeException) { // Not implemented in the helperapi ( see ChartsImpl.java ) if ( true ) - throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), SbERR_BAD_METHOD, rtl::OUString() ); + throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), SbERR_BAD_METHOD, rtl::OUString() ); return aNULL(); } -uno::Reference< excel::XChart > SAL_CALL +uno::Reference< excel::XChart > SAL_CALL ScVbaCharts::getActiveChart() throw (script::BasicErrorException, uno::RuntimeException) { return xActiveChart; } -uno::Reference< container::XEnumeration > SAL_CALL +uno::Reference< container::XEnumeration > SAL_CALL ScVbaCharts::createEnumeration() throw (uno::RuntimeException) { // #FIXME not implemented if ( true ) - throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), SbERR_BAD_METHOD, rtl::OUString() ); + throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), SbERR_BAD_METHOD, rtl::OUString() ); return uno::Reference< container::XEnumeration >(); } // #FIXME #TODO this method shouldn't appear in this class directly // a XIndexAccess/XNameAccess wrapper should be passed to the base class instead -::sal_Int32 SAL_CALL +::sal_Int32 SAL_CALL ScVbaCharts::getCount() throw (uno::RuntimeException) { sal_Int32 ncount = 0; @@ -88,14 +88,14 @@ ScVbaCharts::getCount() throw (uno::RuntimeException) { throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), SbERR_METHOD_FAILED, rtl::OUString() ); } - return ncount; + return ncount; } uno::Any ScVbaCharts::createCollectionObject( const uno::Any& aSource ) { if ( true ) - throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), SbERR_BAD_METHOD, rtl::OUString() ); + throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), SbERR_BAD_METHOD, rtl::OUString() ); // #TODO implementation please return aSource; } @@ -107,7 +107,7 @@ ScVbaCharts::getServiceImplName() return sImplName; } -css::uno::Sequence<rtl::OUString> +css::uno::Sequence<rtl::OUString> ScVbaCharts::getServiceNames() { static uno::Sequence< rtl::OUString > sNames; diff --git a/sc/source/ui/vba/vbacharts.hxx b/sc/source/ui/vba/vbacharts.hxx index 76bd2bec808b..399910a6c2f6 100644 --- a/sc/source/ui/vba/vbacharts.hxx +++ b/sc/source/ui/vba/vbacharts.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -36,7 +36,7 @@ typedef CollTestImplHelper< ov::excel::XCharts > Charts_BASE; class ScVbaCharts : public Charts_BASE -{ +{ css::uno::Reference< ov::excel::XChart > xActiveChart; css::uno::Reference< css::sheet::XSpreadsheetDocument > xSpreadsheetDocument; css::uno::Reference< css::lang::XComponent > xComponent; @@ -51,13 +51,13 @@ public: virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException); // XElementAccess virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException) { return ov::excel::XChart::static_type(0); } - // ScVbaCollectionBaseImpl - virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); + // ScVbaCollectionBaseImpl + virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); // Charts_BASE or HelperInterface virtual rtl::OUString& getServiceImplName(); virtual css::uno::Sequence<rtl::OUString> getServiceNames(); }; -#endif +#endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/vba/vbacharttitle.cxx b/sc/source/ui/vba/vbacharttitle.cxx index 09f678704422..ca81743b179f 100644 --- a/sc/source/ui/vba/vbacharttitle.cxx +++ b/sc/source/ui/vba/vbacharttitle.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -41,7 +41,7 @@ ScVbaChartTitle::getServiceImplName() return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > ScVbaChartTitle::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sc/source/ui/vba/vbacharttitle.hxx b/sc/source/ui/vba/vbacharttitle.hxx index db0f3e31529f..2fe2d9e618d9 100644 --- a/sc/source/ui/vba/vbacharttitle.hxx +++ b/sc/source/ui/vba/vbacharttitle.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sc/source/ui/vba/vbacomment.hxx b/sc/source/ui/vba/vbacomment.hxx index 81670dca678a..7f6a5a3d5a77 100644 --- a/sc/source/ui/vba/vbacomment.hxx +++ b/sc/source/ui/vba/vbacomment.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sc/source/ui/vba/vbacomments.cxx b/sc/source/ui/vba/vbacomments.cxx index c4c290da3b2a..4d8d79a2106b 100644 --- a/sc/source/ui/vba/vbacomments.cxx +++ b/sc/source/ui/vba/vbacomments.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -60,7 +60,7 @@ public: {} virtual uno::Any SAL_CALL nextElement() throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) - { + { return AnnotationToComment( m_xEnumeration->nextElement(), m_xContext, mxModel ); } @@ -91,20 +91,20 @@ ScVbaComments::createCollectionObject( const css::uno::Any& aSource ) return AnnotationToComment( aSource, mxContext, mxModel ); } -uno::Type +uno::Type ScVbaComments::getElementType() throw (uno::RuntimeException) { return excel::XComment::static_type(0); } -rtl::OUString& +rtl::OUString& ScVbaComments::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaComments") ); return sImplName; } -css::uno::Sequence<rtl::OUString> +css::uno::Sequence<rtl::OUString> ScVbaComments::getServiceNames() { static uno::Sequence< rtl::OUString > sNames; diff --git a/sc/source/ui/vba/vbacomments.hxx b/sc/source/ui/vba/vbacomments.hxx index 8b65a3cafc8a..babefb4e6739 100644 --- a/sc/source/ui/vba/vbacomments.hxx +++ b/sc/source/ui/vba/vbacomments.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -54,7 +54,7 @@ public: virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException); // ScVbaComments_BASE - virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); + virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); virtual rtl::OUString& getServiceImplName(); virtual css::uno::Sequence<rtl::OUString> getServiceNames(); diff --git a/sc/source/ui/vba/vbacondition.cxx b/sc/source/ui/vba/vbacondition.cxx index 321ca60d810f..6065f123ef39 100644 --- a/sc/source/ui/vba/vbacondition.cxx +++ b/sc/source/ui/vba/vbacondition.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -40,16 +40,16 @@ const sal_Int32 ISFORMULA = 98765432; template< typename Ifc1 > ScVbaCondition< Ifc1 >::ScVbaCondition( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< sheet::XSheetCondition >& _xSheetCondition ) : ScVbaCondition_BASE( xParent, xContext ), mxSheetCondition( _xSheetCondition ) { - mxAddressable.set( xParent, uno::UNO_QUERY_THROW ); + mxAddressable.set( xParent, uno::UNO_QUERY_THROW ); } template< typename Ifc1 > -sheet::ConditionOperator +sheet::ConditionOperator ScVbaCondition< Ifc1 >::retrieveAPIOperator( const uno::Any& _aOperator) throw ( script::BasicErrorException ) { sheet::ConditionOperator aRetAPIOperator = sheet::ConditionOperator_NONE; sal_Int32 nOperator = 0; - if ( (_aOperator >>= nOperator ) ) + if ( (_aOperator >>= nOperator ) ) { switch(nOperator) { @@ -86,21 +86,21 @@ ScVbaCondition< Ifc1 >::retrieveAPIOperator( const uno::Any& _aOperator) throw ( } template< typename Ifc1 > -rtl::OUString +rtl::OUString ScVbaCondition< Ifc1 >::Formula1( ) throw ( script::BasicErrorException, uno::RuntimeException ) { return mxSheetCondition->getFormula1(); } template< typename Ifc1 > -rtl::OUString +rtl::OUString ScVbaCondition< Ifc1 >::Formula2( ) throw ( script::BasicErrorException, uno::RuntimeException ) { return mxSheetCondition->getFormula2(); } template< typename Ifc1 > -void +void ScVbaCondition< Ifc1 >::setFormula1( const uno::Any& _aFormula1) throw ( script::BasicErrorException ) { rtl::OUString sFormula; @@ -114,18 +114,18 @@ ScVbaCondition< Ifc1 >::setFormula1( const uno::Any& _aFormula1) throw ( script: } template< typename Ifc1 > -void +void ScVbaCondition< Ifc1 >::setFormula2( const uno::Any& _aFormula2) throw ( script::BasicErrorException ) { rtl::OUString sFormula2; - // #TODO surely this can't be right? + // #TODO surely this can't be right? // ( from helperapi/impl/.../calc/ConditionImpl.java if ( (_aFormula2 >>= sFormula2 )) mxSheetCondition->setFormula1(sFormula2); } template< typename Ifc1 > -sal_Int32 +sal_Int32 ScVbaCondition< Ifc1 >::Operator(sal_Bool _bIncludeFormulaValue) throw ( script::BasicErrorException ) { sal_Int32 retvalue = -1; @@ -160,13 +160,13 @@ ScVbaCondition< Ifc1 >::Operator(sal_Bool _bIncludeFormulaValue) throw ( script: if (_bIncludeFormulaValue) { //#FIXME huh what's this all about - // from helperapi/impl/.../calc/ConditionImpl + // from helperapi/impl/.../calc/ConditionImpl retvalue = ISFORMULA; break; } case sheet::ConditionOperator_NONE: default: - DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Operator not supported"))); + DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Operator not supported"))); break; } return retvalue; diff --git a/sc/source/ui/vba/vbacondition.hxx b/sc/source/ui/vba/vbacondition.hxx index 878e3d9e346f..80e1b5bccd88 100644 --- a/sc/source/ui/vba/vbacondition.hxx +++ b/sc/source/ui/vba/vbacondition.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -27,8 +27,8 @@ ************************************************************************/ #ifndef SC_VBA_CONDITION_HXX #define SC_VBA_CONDITION_HXX -#include <com/sun/star/sheet/XSheetCondition.hpp> -#include <com/sun/star/sheet/XCellRangeAddressable.hpp> +#include <com/sun/star/sheet/XSheetCondition.hpp> +#include <com/sun/star/sheet/XCellRangeAddressable.hpp> #include <vbahelper/vbahelperinterface.hxx> #include <com/sun/star/sheet/ConditionOperator.hpp> @@ -50,8 +50,8 @@ public: virtual void setFormula2( const css::uno::Any& _aFormula2) throw ( css::script::BasicErrorException ); virtual sal_Int32 Operator(sal_Bool _bIncludeFormulaValue) throw ( css::script::BasicErrorException ); virtual sal_Int32 SAL_CALL Operator() throw ( css::script::BasicErrorException, css::uno::RuntimeException ) = 0; - + }; -#endif +#endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/vba/vbadialog.cxx b/sc/source/ui/vba/vbadialog.cxx index 7b2a0edb4103..452fa9aeb84a 100644 --- a/sc/source/ui/vba/vbadialog.cxx +++ b/sc/source/ui/vba/vbadialog.cxx @@ -36,38 +36,38 @@ using namespace ::com::sun::star; //solve the problem that "Application.Dialogs.Item(***).Show" and "Application.Dialogs.Count" cannot get the correct result struct DialogMatch { - sal_Int32 nVbaDlgIndex; - rtl::OUString aOODlgName; + sal_Int32 nVbaDlgIndex; + rtl::OUString aOODlgName; }; static const DialogMatch aDialogMatchList[] = { - { 1, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Open" ) ) }, // xlDialogOpen -> .uno:Open - { -1, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormatCellDialog" ) ) }, // ??? -> .uno:FormatCellDialog - { 55, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:InsertCell" ) ) }, // xlDialogInsert -> .uno:InsertCell - { 8, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Print" ) ) }, // xlDialogPrint -> .uno:Print - { 9, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PrinterSetup" ) ) }, // xlDialogPrinterSetup -> .uno:PrinterSetup - { 53, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PasteSpecial" ) ) }, // xlDialogPasteSpecial -> .uno:PasteSpecial - { 28, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ToolProtectionDocument" ) ) }, // xlDialogProtectDocument -> uno:ToolProtectionDocument - { 47, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ColumnWidth" ) ) }, // xlDialogColumnWidth -> .uno:ColumnWidth - { 61, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DefineName" ) ) }, // xlDialogDefineName -> .uno:DefineName - { -1, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ConfigureDialog" ) ) }, // ??? -> .uno:ConfigureDialog - { 596, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:HyperlinkDialog" ) ) }, // xlDialogInsertHyperlink -> .uno:HyperlinkDialog - { 342, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:InsertGraphic" ) ) }, // xlDialogInsertPicture -> .uno:InsertGraphic - { 259, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:InsertObject" ) ) }, // xlDialogInsertObject -> .uno:InsertObject - { 7, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PageFormatDialog" ) ) }, // xlDialogPageSetup -> .uno:PageFormatDialog - { 39, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DataSort" ) ) }, // xlDialogSort -> .uno:DataSort - { 127, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:RowHeight" ) ) }, // xlDialogRowHeight -> .uno:RowHeight - { 485, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:AutoCorrectDlg" ) ) }, // xlDialogAutoCorrect -> .uno:AutoCorrectDlg - { 583, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ConditionalFormatDialog" ) ) }, // xlDialogCondiationalFormatting -> .uno:ConditionalFormatDialog - { 191, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DataConsolidate" ) ) }, // xlDialogConsolidate -> .uno:DataConsolidate - { 62, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:CreateNames" ) ) }, // xlDialogCreateNames -> .uno:CreateNames - { -1, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FillSeries" ) ) }, // ??? -> .uno:FillSeries - { -1, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Validation" ) ) }, // ??? -> .uno:Validation" - { -1, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DefineLabelRange" ) ) }, // ??? -> .uno:DefineLabelRange - { -1, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DataFilterAutoFilter" ) ) }, // ??? -> .uno:DataFilterAutoFilter - { -1, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DataFilterSpecialFilter" ) ) }, // ??? -> .uno:DataFilterSpecialFilter - { 269, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:AutoFormat" ) ) } // xlDialogFormatAuto -> .uno:AutoFormat + { 1, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Open" ) ) }, // xlDialogOpen -> .uno:Open + { -1, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormatCellDialog" ) ) }, // ??? -> .uno:FormatCellDialog + { 55, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:InsertCell" ) ) }, // xlDialogInsert -> .uno:InsertCell + { 8, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Print" ) ) }, // xlDialogPrint -> .uno:Print + { 9, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PrinterSetup" ) ) }, // xlDialogPrinterSetup -> .uno:PrinterSetup + { 53, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PasteSpecial" ) ) }, // xlDialogPasteSpecial -> .uno:PasteSpecial + { 28, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ToolProtectionDocument" ) ) }, // xlDialogProtectDocument -> uno:ToolProtectionDocument + { 47, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ColumnWidth" ) ) }, // xlDialogColumnWidth -> .uno:ColumnWidth + { 61, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DefineName" ) ) }, // xlDialogDefineName -> .uno:DefineName + { -1, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ConfigureDialog" ) ) }, // ??? -> .uno:ConfigureDialog + { 596, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:HyperlinkDialog" ) ) }, // xlDialogInsertHyperlink -> .uno:HyperlinkDialog + { 342, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:InsertGraphic" ) ) }, // xlDialogInsertPicture -> .uno:InsertGraphic + { 259, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:InsertObject" ) ) }, // xlDialogInsertObject -> .uno:InsertObject + { 7, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PageFormatDialog" ) ) }, // xlDialogPageSetup -> .uno:PageFormatDialog + { 39, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DataSort" ) ) }, // xlDialogSort -> .uno:DataSort + { 127, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:RowHeight" ) ) }, // xlDialogRowHeight -> .uno:RowHeight + { 485, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:AutoCorrectDlg" ) ) }, // xlDialogAutoCorrect -> .uno:AutoCorrectDlg + { 583, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ConditionalFormatDialog" ) ) }, // xlDialogCondiationalFormatting -> .uno:ConditionalFormatDialog + { 191, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DataConsolidate" ) ) }, // xlDialogConsolidate -> .uno:DataConsolidate + { 62, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:CreateNames" ) ) }, // xlDialogCreateNames -> .uno:CreateNames + { -1, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FillSeries" ) ) }, // ??? -> .uno:FillSeries + { -1, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Validation" ) ) }, // ??? -> .uno:Validation" + { -1, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DefineLabelRange" ) ) }, // ??? -> .uno:DefineLabelRange + { -1, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DataFilterAutoFilter" ) ) }, // ??? -> .uno:DataFilterAutoFilter + { -1, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DataFilterSpecialFilter" ) ) }, // ??? -> .uno:DataFilterSpecialFilter + { 269, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:AutoFormat" ) ) } // xlDialogFormatAuto -> .uno:AutoFormat }; const sal_Int32 nDialogSize = SAL_N_ELEMENTS( aDialogMatchList ) ; diff --git a/sc/source/ui/vba/vbadialog.hxx b/sc/source/ui/vba/vbadialog.hxx index da733ce92247..9c73aca10fbf 100644 --- a/sc/source/ui/vba/vbadialog.hxx +++ b/sc/source/ui/vba/vbadialog.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sc/source/ui/vba/vbadialogs.hxx b/sc/source/ui/vba/vbadialogs.hxx index ff4e1553f52f..785757b0a4e5 100644 --- a/sc/source/ui/vba/vbadialogs.hxx +++ b/sc/source/ui/vba/vbadialogs.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -40,7 +40,7 @@ typedef cppu::ImplInheritanceHelper1< VbaDialogsBase, ov::excel::XDialogs > ScVb class ScVbaDialogs : public ScVbaDialogs_BASE { public: - ScVbaDialogs( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, const css::uno::Reference< css::frame::XModel >& xModel ): ScVbaDialogs_BASE( xParent, xContext, xModel ) {} + ScVbaDialogs( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, const css::uno::Reference< css::frame::XModel >& xModel ): ScVbaDialogs_BASE( xParent, xContext, xModel ) {} virtual ~ScVbaDialogs() {} // XCollection diff --git a/sc/source/ui/vba/vbaeventshelper.cxx b/sc/source/ui/vba/vbaeventshelper.cxx index 5e9eab58e8c4..abca80602ef5 100644 --- a/sc/source/ui/vba/vbaeventshelper.cxx +++ b/sc/source/ui/vba/vbaeventshelper.cxx @@ -392,7 +392,7 @@ ScVbaEventsHelper::ScVbaEventsHelper( const uno::Sequence< uno::Any >& rArgs, co { mpDocShell = dynamic_cast< ScDocShell* >( mpShell ); // mpShell from base class mpDoc = mpDocShell ? mpDocShell->GetDocument() : 0; - + if( !mxModel.is() || !mpDocShell || !mpDoc ) return; @@ -692,7 +692,7 @@ uno::Any ScVbaEventsHelper::createWorksheet( const uno::Sequence< uno::Any >& rA // extract sheet index, will throw, if parameter is invalid SCTAB nTab = getTabFromArgs( rArgs, nIndex ); - + // create Workbook uno::Sequence< uno::Any > aArgs( 2 ); aArgs[ 0 ] <<= uno::Reference< uno::XInterface >(); diff --git a/sc/source/ui/vba/vbaeventshelper.hxx b/sc/source/ui/vba/vbaeventshelper.hxx index f0c73dd88d7f..3bd9655139b5 100644 --- a/sc/source/ui/vba/vbaeventshelper.hxx +++ b/sc/source/ui/vba/vbaeventshelper.hxx @@ -50,7 +50,7 @@ public: // XEventListener virtual void SAL_CALL disposing( const css::lang::EventObject& rSource ) throw (css::uno::RuntimeException); - + protected: virtual bool implEventsEnabled() throw (css::uno::RuntimeException); virtual bool implPrepareEvent( EventQueue& rEventQueue, const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::uno::RuntimeException); @@ -74,7 +74,7 @@ private: css::uno::Any createHyperlink( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) const throw (css::lang::IllegalArgumentException, css::uno::RuntimeException); /** Creates a VBA Window object. */ css::uno::Any createWindow() const throw (css::uno::RuntimeException); - + private: mutable css::uno::WeakReference< ov::excel::XApplication > mxApplication; ::rtl::Reference< ScVbaEventsListener > mxListener; diff --git a/sc/source/ui/vba/vbafiledialog.cxx b/sc/source/ui/vba/vbafiledialog.cxx index 482e6ab2d5e1..9cb308529b88 100644 --- a/sc/source/ui/vba/vbafiledialog.cxx +++ b/sc/source/ui/vba/vbafiledialog.cxx @@ -41,7 +41,7 @@ using namespace ::com::sun::star::uno; ScVbaFileDialog::ScVbaFileDialog( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, const css::uno::Reference< css::frame::XModel >& xModel ) -: ScVbaFileDialog_BASE( xParent, xContext, xModel ) +: ScVbaFileDialog_BASE( xParent, xContext, xModel ) { m_pFileDialogSelectedItems = new VbaFileDialogSelectedItems(xParent, xContext, (com::sun::star::container::XIndexAccess *)&m_FileDialogSelectedObj); } diff --git a/sc/source/ui/vba/vbafiledialogselecteditems.hxx b/sc/source/ui/vba/vbafiledialogselecteditems.hxx index b43364dff709..063bc502667a 100644 --- a/sc/source/ui/vba/vbafiledialogselecteditems.hxx +++ b/sc/source/ui/vba/vbafiledialogselecteditems.hxx @@ -77,7 +77,7 @@ public: //XEnumeration virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (css::uno::RuntimeException); - virtual css::uno::Any SAL_CALL nextElement( ) throw (css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException); + virtual css::uno::Any SAL_CALL nextElement( ) throw (css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException); protected: private: diff --git a/sc/source/ui/vba/vbafont.cxx b/sc/source/ui/vba/vbafont.cxx index 68ade5207674..1d37851785fe 100644 --- a/sc/source/ui/vba/vbafont.cxx +++ b/sc/source/ui/vba/vbafont.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -57,7 +57,7 @@ ScVbaFont::ScVbaFont( { } -SfxItemSet* +SfxItemSet* ScVbaFont::GetDataSet() { return mpRangeObj ? excel::ScVbaCellRangeAccess::GetDataSet( mpRangeObj ) : 0; @@ -78,7 +78,7 @@ uno::Reference< beans::XPropertySet > lcl_TextProperties( uno::Reference< table: void SAL_CALL ScVbaFont::setSuperscript( const uno::Any& aValue ) throw ( uno::RuntimeException ) { - // #FIXEME create some sort of generic get/set code where + // #FIXEME create some sort of generic get/set code where // you can pass a functor // get/set - Super/sub script code is exactly the same // except for the call applied at each cell position @@ -317,7 +317,7 @@ ScVbaFont::setFontStyle( const uno::Any& aValue ) throw( uno::RuntimeException ) rtl::OUString aToken = aStyles.getToken( 0, ' ', nIndex ); aTokens.push_back( aToken ); }while( nIndex >= 0 ); - + std::vector< rtl::OUString >::iterator it; for( it = aTokens.begin(); it != aTokens.end(); ++it ) { @@ -341,7 +341,7 @@ ScVbaFont::getFontStyle() throw ( uno::RuntimeException ) getBold() >>= bValue; if( bValue ) aStyles.appendAscii("Bold"); - + getItalic() >>= bValue; if( bValue ) { diff --git a/sc/source/ui/vba/vbafont.hxx b/sc/source/ui/vba/vbafont.hxx index b87672a1223a..d7f9010c3cfd 100644 --- a/sc/source/ui/vba/vbafont.hxx +++ b/sc/source/ui/vba/vbafont.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sc/source/ui/vba/vbaformat.cxx b/sc/source/ui/vba/vbaformat.cxx index a493bac28e05..a38c7f3c8876 100644 --- a/sc/source/ui/vba/vbaformat.cxx +++ b/sc/source/ui/vba/vbaformat.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -66,7 +66,7 @@ ScVbaFormat< Ifc1 >::ScVbaFormat( const uno::Reference< XHelperInterface >& xPar mxServiceInfo.set( mxPropertySet, uno::UNO_QUERY_THROW ); if ( !mxModel.is() ) DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XModel Interface could not be retrieved") ) ); - mxNumberFormatsSupplier.set( mxModel, uno::UNO_QUERY_THROW ); + mxNumberFormatsSupplier.set( mxModel, uno::UNO_QUERY_THROW ); } catch (uno::Exception& ) { @@ -75,16 +75,16 @@ ScVbaFormat< Ifc1 >::ScVbaFormat( const uno::Reference< XHelperInterface >& xPar } template< typename Ifc1 > -void SAL_CALL +void SAL_CALL ScVbaFormat<Ifc1>::setVerticalAlignment( const uno::Any& _oAlignment) throw (script::BasicErrorException, uno::RuntimeException) { - try + try { uno::Any aVal; sal_Int32 nAlignment = 0; if ( !(_oAlignment >>= nAlignment )) throw uno::RuntimeException(); - switch (nAlignment) + switch (nAlignment) { case excel::XlVAlign::xlVAlignBottom : aVal = uno::makeAny( table::CellVertJustify2::BOTTOM ); @@ -96,7 +96,7 @@ ScVbaFormat<Ifc1>::setVerticalAlignment( const uno::Any& _oAlignment) throw (s case excel::XlVAlign::xlVAlignJustify: aVal = uno::makeAny( table::CellVertJustify2::STANDARD ); break; - + case excel::XlVAlign::xlVAlignTop: aVal = uno::makeAny( table::CellVertJustify2::TOP); break; @@ -113,7 +113,7 @@ ScVbaFormat<Ifc1>::setVerticalAlignment( const uno::Any& _oAlignment) throw (s } template< typename Ifc1 > -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaFormat<Ifc1>::getVerticalAlignment( ) throw (script::BasicErrorException, uno::RuntimeException) { uno::Any aResult = aNULL(); @@ -150,10 +150,10 @@ ScVbaFormat<Ifc1>::getVerticalAlignment( ) throw (script::BasicErrorException, } template< typename Ifc1 > -void SAL_CALL +void SAL_CALL ScVbaFormat<Ifc1>::setHorizontalAlignment( const uno::Any& HorizontalAlignment ) throw (script::BasicErrorException, uno::RuntimeException) { - try + try { uno::Any aVal; sal_Int32 nAlignment = 0; @@ -190,7 +190,7 @@ ScVbaFormat<Ifc1>::setHorizontalAlignment( const uno::Any& HorizontalAlignment ) } template< typename Ifc1 > -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaFormat<Ifc1>::getHorizontalAlignment( ) throw (script::BasicErrorException, uno::RuntimeException) { uno::Any NRetAlignment = aNULL(); @@ -200,7 +200,7 @@ ScVbaFormat<Ifc1>::getHorizontalAlignment( ) throw (script::BasicErrorException if (!isAmbiguous(sHoriJust)) { table::CellHoriJustify aAPIAlignment = table::CellHoriJustify_BLOCK; - + if ( mxPropertySet->getPropertyValue(sHoriJust) >>= aAPIAlignment ) { switch( aAPIAlignment ) @@ -231,10 +231,10 @@ ScVbaFormat<Ifc1>::getHorizontalAlignment( ) throw (script::BasicErrorException } template< typename Ifc1 > -void SAL_CALL +void SAL_CALL ScVbaFormat<Ifc1>::setOrientation( const uno::Any& _aOrientation ) throw (script::BasicErrorException, uno::RuntimeException) { - try + try { sal_Int32 nOrientation = 0; if ( !( _aOrientation >>= nOrientation ) ) @@ -268,11 +268,11 @@ ScVbaFormat<Ifc1>::setOrientation( const uno::Any& _aOrientation ) throw (script } } template< typename Ifc1 > -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaFormat<Ifc1>::getOrientation( ) throw (script::BasicErrorException, uno::RuntimeException) { uno::Any NRetOrientation = aNULL(); - try + try { if (!isAmbiguous(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_CELLORI ) ))) { @@ -293,7 +293,7 @@ ScVbaFormat<Ifc1>::getOrientation( ) throw (script::BasicErrorException, uno::R break; case table::CellOrientation_STACKED: NRetOrientation = uno::makeAny( excel::XlOrientation::xlVertical ); - break; + break; default: NRetOrientation = uno::makeAny( excel::XlOrientation::xlHorizontal ); } @@ -307,25 +307,25 @@ ScVbaFormat<Ifc1>::getOrientation( ) throw (script::BasicErrorException, uno::R } template< typename Ifc1 > -void SAL_CALL +void SAL_CALL ScVbaFormat<Ifc1>::setWrapText( const uno::Any& _aWrapText ) throw (script::BasicErrorException, uno::RuntimeException) { - try + try { mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_WRAP ) ), _aWrapText); } catch (uno::Exception& ) { DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString() ); - } + } } template< typename Ifc1 > -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaFormat<Ifc1>::getWrapText( ) throw (script::BasicErrorException, uno::RuntimeException) { uno::Any aWrap = aNULL(); - try + try { rtl::OUString aPropName( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_WRAP ) ) ); if (!isAmbiguous( aPropName )) @@ -341,21 +341,21 @@ ScVbaFormat<Ifc1>::getWrapText( ) throw (script::BasicErrorException, uno::Runt } template< typename Ifc1 > -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaFormat<Ifc1>::Borders( const uno::Any& Index ) throw (script::BasicErrorException, uno::RuntimeException ) { - ScVbaPalette aPalette( excel::getDocShell( mxModel ) ); + ScVbaPalette aPalette( excel::getDocShell( mxModel ) ); uno::Reference< XCollection > xColl = new ScVbaBorders( thisHelperIface(), ScVbaFormat_BASE::mxContext, uno::Reference< table::XCellRange >( mxPropertySet, uno::UNO_QUERY_THROW ), aPalette ); if ( Index.hasValue() ) - { + { return xColl->Item( Index, uno::Any() ); - } + } return uno::makeAny( xColl ); } template< typename Ifc1 > -uno::Reference< excel::XFont > SAL_CALL +uno::Reference< excel::XFont > SAL_CALL ScVbaFormat<Ifc1>::Font( ) throw (script::BasicErrorException, uno::RuntimeException) { ScVbaPalette aPalette( excel::getDocShell( mxModel ) ); @@ -363,33 +363,33 @@ ScVbaFormat<Ifc1>::Font( ) throw (script::BasicErrorException, uno::RuntimeExce } template< typename Ifc1 > -uno::Reference< excel::XInterior > SAL_CALL +uno::Reference< excel::XInterior > SAL_CALL ScVbaFormat<Ifc1>::Interior( ) throw (script::BasicErrorException, uno::RuntimeException) { - return new ScVbaInterior( thisHelperIface(), ScVbaFormat_BASE::mxContext, mxPropertySet ); + return new ScVbaInterior( thisHelperIface(), ScVbaFormat_BASE::mxContext, mxPropertySet ); } template< typename Ifc1 > -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaFormat<Ifc1>::getNumberFormatLocal( ) throw (script::BasicErrorException, uno::RuntimeException) { uno::Any aRet = uno::makeAny( rtl::OUString() ); - try - { + try + { rtl::OUString sPropName( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_NUMBERFO ) ); if (!isAmbiguous( sPropName )) { - + initializeNumberFormats(); - + sal_Int32 nFormat = 0; if ( ! (mxPropertySet->getPropertyValue( sPropName ) >>= nFormat ) ) throw uno::RuntimeException(); - + rtl::OUString sFormat; xNumberFormats->getByKey(nFormat)->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( FORMATSTRING ))) >>= sFormat; aRet = uno::makeAny( sFormat.toAsciiLowerCase() ); - + } } catch (uno::Exception& ) @@ -401,7 +401,7 @@ ScVbaFormat<Ifc1>::getNumberFormatLocal( ) throw (script::BasicErrorException, } template< typename Ifc1 > -void +void ScVbaFormat<Ifc1>::setNumberFormat( lang::Locale _aLocale, const rtl::OUString& _sFormatString) throw( script::BasicErrorException ) { try @@ -421,10 +421,10 @@ ScVbaFormat<Ifc1>::setNumberFormat( lang::Locale _aLocale, const rtl::OUString& } template< typename Ifc1 > -void SAL_CALL +void SAL_CALL ScVbaFormat<Ifc1>::setNumberFormatLocal( const uno::Any& _oLocalFormatString ) throw (script::BasicErrorException, uno::RuntimeException) { - try + try { rtl::OUString sLocalFormatString; sal_Int32 nFormat = -1; @@ -450,15 +450,15 @@ ScVbaFormat<Ifc1>::setNumberFormatLocal( const uno::Any& _oLocalFormatString ) t } template< typename Ifc1 > -void SAL_CALL +void SAL_CALL ScVbaFormat<Ifc1>::setNumberFormat( const uno::Any& _oFormatString ) throw (script::BasicErrorException, uno::RuntimeException) { - try + try { rtl::OUString sFormatString; if ( !( _oFormatString >>= sFormatString ) ) throw uno::RuntimeException(); - + sFormatString = sFormatString.toAsciiUpperCase(); lang::Locale aDefaultLocale = m_aDefaultLocale; @@ -477,24 +477,24 @@ ScVbaFormat<Ifc1>::setNumberFormat( const uno::Any& _oFormatString ) throw (scri { DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString()); } - + } template< typename Ifc1 > -void SAL_CALL +void SAL_CALL ScVbaFormat<Ifc1>::setIndentLevel( const uno::Any& _aLevel ) throw (script::BasicErrorException, uno::RuntimeException) { - try + try { sal_Int32 nLevel = 0; if ( !(_aLevel >>= nLevel ) ) throw uno::RuntimeException(); - table::CellHoriJustify aAPIAlignment = table::CellHoriJustify_STANDARD; - + table::CellHoriJustify aAPIAlignment = table::CellHoriJustify_STANDARD; + rtl::OUString sHoriJust( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_CELLHJUS ) ); if ( !( mxPropertySet->getPropertyValue(sHoriJust) >>= aAPIAlignment ) ) throw uno::RuntimeException(); - if (aAPIAlignment == table::CellHoriJustify_STANDARD) + if (aAPIAlignment == table::CellHoriJustify_STANDARD) mxPropertySet->setPropertyValue( sHoriJust, uno::makeAny( table::CellHoriJustify_LEFT) ) ; mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_PINDENT ) ), uno::makeAny( sal_Int16(nLevel * 352.8) ) ); } @@ -505,11 +505,11 @@ ScVbaFormat<Ifc1>::setIndentLevel( const uno::Any& _aLevel ) throw (script::Basi } template< typename Ifc1 > -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaFormat<Ifc1>::getIndentLevel( ) throw (script::BasicErrorException, uno::RuntimeException) { uno::Any NRetIndentLevel = aNULL(); - try + try { rtl::OUString sParaIndent( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_PINDENT ) ); if (!isAmbiguous(sParaIndent)) @@ -517,9 +517,9 @@ ScVbaFormat<Ifc1>::getIndentLevel( ) throw (script::BasicErrorException, uno::R sal_Int16 IndentLevel = 0; if ( ( mxPropertySet->getPropertyValue(sParaIndent) >>= IndentLevel ) ) NRetIndentLevel = uno::makeAny( sal_Int32( rtl::math::round(static_cast<double>( IndentLevel ) / 352.8)) ); - else + else NRetIndentLevel = uno::makeAny( sal_Int32(0) ); - } + } } catch (uno::Exception& ) { @@ -529,7 +529,7 @@ ScVbaFormat<Ifc1>::getIndentLevel( ) throw (script::BasicErrorException, uno::R } template< typename Ifc1 > -void SAL_CALL +void SAL_CALL ScVbaFormat<Ifc1>::setLocked( const uno::Any& _aLocked ) throw (script::BasicErrorException, uno::RuntimeException) { try @@ -550,7 +550,7 @@ ScVbaFormat<Ifc1>::setLocked( const uno::Any& _aLocked ) throw (script::BasicErr } template< typename Ifc1 > -void SAL_CALL +void SAL_CALL ScVbaFormat<Ifc1>::setFormulaHidden( const uno::Any& FormulaHidden ) throw (script::BasicErrorException, uno::RuntimeException) { try @@ -559,25 +559,25 @@ ScVbaFormat<Ifc1>::setFormulaHidden( const uno::Any& FormulaHidden ) throw (scri FormulaHidden >>= bIsFormulaHidden; util::CellProtection aCellProtection; rtl::OUString sCellProt( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_CELLPRO ) ); - mxPropertySet->getPropertyValue(sCellProt) >>= aCellProtection; + mxPropertySet->getPropertyValue(sCellProt) >>= aCellProtection; aCellProtection.IsFormulaHidden = bIsFormulaHidden; mxPropertySet->setPropertyValue(sCellProt,uno::makeAny(aCellProtection)); } catch (uno::Exception& ) { - DebugHelper::exception( SbERR_METHOD_FAILED, rtl::OUString() ); + DebugHelper::exception( SbERR_METHOD_FAILED, rtl::OUString() ); } } template< typename Ifc1 > -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaFormat<Ifc1>::getLocked( ) throw (script::BasicErrorException, uno::RuntimeException) { uno::Any aCellProtection = aNULL(); - try + try { rtl::OUString sCellProt( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_CELLPRO ) ); - + if (!isAmbiguous(sCellProt)) { SfxItemSet* pDataSet = getCurrentDataSet(); @@ -598,13 +598,13 @@ ScVbaFormat<Ifc1>::getLocked( ) throw (script::BasicErrorException, uno::Runtim } catch (uno::Exception& ) { - DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString()); + DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString()); } return aCellProtection; } template< typename Ifc1 > -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaFormat<Ifc1>::getFormulaHidden( ) throw (script::BasicErrorException, uno::RuntimeException) { uno::Any aBoolRet = aNULL(); @@ -624,20 +624,20 @@ ScVbaFormat<Ifc1>::getFormulaHidden( ) throw (script::BasicErrorException, uno: else { util::CellProtection aCellProtection; - mxPropertySet->getPropertyValue(sCellProt) >>= aCellProtection; - aBoolRet = uno::makeAny( aCellProtection.IsFormulaHidden ); + mxPropertySet->getPropertyValue(sCellProt) >>= aCellProtection; + aBoolRet = uno::makeAny( aCellProtection.IsFormulaHidden ); } } } catch (uno::Exception e) { DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString()); - } + } return aBoolRet; } template< typename Ifc1 > -void SAL_CALL +void SAL_CALL ScVbaFormat<Ifc1>::setShrinkToFit( const uno::Any& ShrinkToFit ) throw (script::BasicErrorException, uno::RuntimeException) { try @@ -652,7 +652,7 @@ ScVbaFormat<Ifc1>::setShrinkToFit( const uno::Any& ShrinkToFit ) throw (script:: } template< typename Ifc1 > -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaFormat<Ifc1>::getShrinkToFit( ) throw (script::BasicErrorException, uno::RuntimeException) { uno::Any aRet = aNULL(); @@ -664,13 +664,13 @@ ScVbaFormat<Ifc1>::getShrinkToFit( ) throw (script::BasicErrorException, uno::R } catch (uno::Exception& ) { - DebugHelper::exception(SbERR_NOT_IMPLEMENTED, rtl::OUString()); + DebugHelper::exception(SbERR_NOT_IMPLEMENTED, rtl::OUString()); } return aRet; } template< typename Ifc1 > -void SAL_CALL +void SAL_CALL ScVbaFormat<Ifc1>::setReadingOrder( const uno::Any& ReadingOrder ) throw (script::BasicErrorException, uno::RuntimeException) { try @@ -688,22 +688,22 @@ ScVbaFormat<Ifc1>::setReadingOrder( const uno::Any& ReadingOrder ) throw (script aVal = uno::makeAny( text::WritingMode_RL_TB ); break; case excel::Constants::xlContext: - DebugHelper::exception(SbERR_NOT_IMPLEMENTED, rtl::OUString()); + DebugHelper::exception(SbERR_NOT_IMPLEMENTED, rtl::OUString()); break; default: - DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString()); + DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString()); } mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_WRITING ) ), aVal ); } catch (uno::Exception& ) { - DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString()); + DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString()); } } template< typename Ifc1 > -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaFormat<Ifc1>::getReadingOrder( ) throw (script::BasicErrorException, uno::RuntimeException) { uno::Any NRetReadingOrder = aNULL(); @@ -713,7 +713,7 @@ ScVbaFormat<Ifc1>::getReadingOrder( ) throw (script::BasicErrorException, uno:: if (!isAmbiguous(sWritingMode)) { text::WritingMode aWritingMode = text::WritingMode_LR_TB; - if ( ( mxPropertySet->getPropertyValue(sWritingMode) ) >>= aWritingMode ) + if ( ( mxPropertySet->getPropertyValue(sWritingMode) ) >>= aWritingMode ) switch (aWritingMode){ case text::WritingMode_LR_TB: NRetReadingOrder = uno::makeAny(excel::Constants::xlLTR); @@ -731,19 +731,19 @@ ScVbaFormat<Ifc1>::getReadingOrder( ) throw (script::BasicErrorException, uno:: DebugHelper::exception(SbERR_NOT_IMPLEMENTED, rtl::OUString()); } return NRetReadingOrder; - + } template< typename Ifc1 > -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaFormat< Ifc1 >::getNumberFormat( ) throw (script::BasicErrorException, uno::RuntimeException) { uno::Any aFormat = aNULL(); - try + try { sal_Int32 nFormat = -1; rtl::OUString sNumFormat( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_NUMBERFO ) ); - if (!isAmbiguous(sNumFormat) && + if (!isAmbiguous(sNumFormat) && ( mxPropertySet->getPropertyValue(sNumFormat) >>= nFormat) ) { initializeNumberFormats(); @@ -774,24 +774,24 @@ ScVbaFormat<Ifc1>::isAmbiguous(const rtl::OUString& _sPropertyName) throw ( scri catch (uno::Exception& ) { DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString()); - } + } return bResult; } template< typename Ifc1 > -void +void ScVbaFormat<Ifc1>::initializeNumberFormats() throw ( script::BasicErrorException ) { if ( !xNumberFormats.is() ) { - mxNumberFormatsSupplier.set( mxModel, uno::UNO_QUERY_THROW ); + mxNumberFormatsSupplier.set( mxModel, uno::UNO_QUERY_THROW ); xNumberFormats = mxNumberFormatsSupplier->getNumberFormats(); xNumberFormatTypes.set( xNumberFormats, uno::UNO_QUERY ); // _THROW? } } template< typename Ifc1 > -uno::Reference< beans::XPropertyState > +uno::Reference< beans::XPropertyState > ScVbaFormat<Ifc1>::getXPropertyState() throw ( uno::RuntimeException ) { if ( !xPropertyState.is() ) @@ -821,20 +821,20 @@ ScVbaFormat<Ifc1>::getServiceNames() } template< typename Ifc1 > -ScCellRangesBase* +ScCellRangesBase* ScVbaFormat<Ifc1>::getCellRangesBase() throw ( ::uno::RuntimeException ) { return ScCellRangesBase::getImplementation( mxPropertySet ); } template< typename Ifc1 > -SfxItemSet* +SfxItemSet* ScVbaFormat<Ifc1>::getCurrentDataSet( ) throw ( uno::RuntimeException ) { SfxItemSet* pDataSet = excel::ScVbaCellRangeAccess::GetDataSet( getCellRangesBase() ); if ( !pDataSet ) throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Can't access Itemset for XPropertySet" ) ), uno::Reference< uno::XInterface >() ); - return pDataSet; + return pDataSet; } diff --git a/sc/source/ui/vba/vbaformat.hxx b/sc/source/ui/vba/vbaformat.hxx index 3646665f5b24..60d1a4460ae1 100644 --- a/sc/source/ui/vba/vbaformat.hxx +++ b/sc/source/ui/vba/vbaformat.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -29,10 +29,10 @@ #define SC_VBA_FORMAT_HXX #include <ooo/vba/excel/XFormat.hpp> #include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/util/XNumberFormatsSupplier.hpp> +#include <com/sun/star/util/XNumberFormatsSupplier.hpp> #include <com/sun/star/util/XNumberFormats.hpp> -#include <com/sun/star/util/XNumberFormatTypes.hpp> -#include <com/sun/star/frame/XModel.hpp> +#include <com/sun/star/util/XNumberFormatTypes.hpp> +#include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/Locale.hpp> @@ -69,7 +69,7 @@ protected: public: ScVbaFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet, const css::uno::Reference< css::frame::XModel >& xModel, bool bCheckAmbiguoity ) throw ( css::script::BasicErrorException ); virtual ~ScVbaFormat() {} - virtual css::uno::Reference< ov::XHelperInterface > thisHelperIface() = 0; + virtual css::uno::Reference< ov::XHelperInterface > thisHelperIface() = 0; css::uno::Reference< css::lang::XServiceInfo > getXServiceInfo() { return mxServiceInfo; } void SAL_CALL setAddIndent( const css::uno::Any& _BAddIndent) throw( css::uno::RuntimeException ) { _BAddIndent >>= mbAddIndent; } css::uno::Any SAL_CALL getAddIndent() throw( css::uno::RuntimeException ) { return css::uno::makeAny( mbAddIndent ); } @@ -98,7 +98,7 @@ public: virtual void SAL_CALL setFormulaHidden( const css::uno::Any& FormulaHidden ) throw (css::script::BasicErrorException, css::uno::RuntimeException); virtual css::uno::Any SAL_CALL getFormulaHidden( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); virtual void SAL_CALL setMergeCells( const css::uno::Any& MergeCells ) throw (css::script::BasicErrorException, css::uno::RuntimeException) = 0; - virtual css::uno::Any SAL_CALL getMergeCells( ) throw (css::script::BasicErrorException, css::uno::RuntimeException) = 0; + virtual css::uno::Any SAL_CALL getMergeCells( ) throw (css::script::BasicErrorException, css::uno::RuntimeException) = 0; virtual void SAL_CALL setReadingOrder( const css::uno::Any& ReadingOrder ) throw (css::script::BasicErrorException, css::uno::RuntimeException); virtual css::uno::Any SAL_CALL getReadingOrder( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); // XHelperInterface @@ -106,6 +106,6 @@ public: virtual css::uno::Sequence<rtl::OUString> getServiceNames(); }; -#endif +#endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/vba/vbaformatcondition.cxx b/sc/source/ui/vba/vbaformatcondition.cxx index deed22ab287e..ce7ecfd52a1c 100644 --- a/sc/source/ui/vba/vbaformatcondition.cxx +++ b/sc/source/ui/vba/vbaformatcondition.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -32,7 +32,7 @@ using namespace ::ooo::vba; using namespace ::com::sun::star; -ScVbaFormatConditions* +ScVbaFormatConditions* lcl_getScVbaFormatConditionsPtr( const uno::Reference< excel::XFormatConditions >& xFormatConditions ) throw ( script::BasicErrorException ) { ScVbaFormatConditions* pFormatConditions = static_cast< ScVbaFormatConditions* >( xFormatConditions.get() ); @@ -49,7 +49,7 @@ ScVbaFormatCondition::ScVbaFormatCondition( const uno::Reference< XHelperInterf } -void SAL_CALL +void SAL_CALL ScVbaFormatCondition::Delete( ) throw (script::BasicErrorException, uno::RuntimeException) { ScVbaFormatConditions* pFormatConditions = lcl_getScVbaFormatConditionsPtr( moFormatConditions ); @@ -57,7 +57,7 @@ ScVbaFormatCondition::Delete( ) throw (script::BasicErrorException, uno::Runtim notifyRange(); } -void SAL_CALL +void SAL_CALL ScVbaFormatCondition::Modify( ::sal_Int32 _nType, const uno::Any& _aOperator, const uno::Any& _aFormula1, const uno::Any& _aFormula2 ) throw (script::BasicErrorException, uno::RuntimeException) { try @@ -72,18 +72,18 @@ ScVbaFormatCondition::Modify( ::sal_Int32 _nType, const uno::Any& _aOperator, co } } -uno::Reference< excel::XInterior > SAL_CALL +uno::Reference< excel::XInterior > SAL_CALL ScVbaFormatCondition::Interior( ) throw (script::BasicErrorException, uno::RuntimeException) { return mxStyle->Interior(); } -uno::Reference< excel::XFont > SAL_CALL +uno::Reference< excel::XFont > SAL_CALL ScVbaFormatCondition::Font( ) throw (script::BasicErrorException, uno::RuntimeException) { return mxStyle->Font(); } -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaFormatCondition::Borders( const uno::Any& Index ) throw (script::BasicErrorException, uno::RuntimeException) { return mxStyle->Borders( Index ); } @@ -103,11 +103,11 @@ ScVbaFormatCondition::retrieveAPIType(sal_Int32 _nVBAType, const uno::Reference< break; default: DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString() ); - } + } return aAPIType; } -void +void ScVbaFormatCondition::setFormula1( const uno::Any& _aFormula1) throw ( script::BasicErrorException ) { // getA1Formula *SHOULD* detect whether the formula is r1c1 or A1 syntax @@ -121,7 +121,7 @@ ScVbaFormatCondition::setFormula2( const uno::Any& _aFormula2) throw ( script::B ScVbaFormatCondition_BASE::setFormula1( uno::makeAny( lcl_getScVbaFormatConditionsPtr( moFormatConditions )->getA1Formula(_aFormula2)) ); } -::sal_Int32 SAL_CALL +::sal_Int32 SAL_CALL ScVbaFormatCondition::Type( ) throw ( script::BasicErrorException, uno::RuntimeException ) { sal_Int32 nReturnType = 0; @@ -133,18 +133,18 @@ ScVbaFormatCondition::Type( ) throw ( script::BasicErrorException, uno::Runtime } -::sal_Int32 +::sal_Int32 ScVbaFormatCondition::Operator( sal_Bool bVal ) throw (script::BasicErrorException ) { return ScVbaFormatCondition_BASE::Operator( bVal ); } -::sal_Int32 SAL_CALL +::sal_Int32 SAL_CALL ScVbaFormatCondition::Operator( ) throw (script::BasicErrorException, uno::RuntimeException) { return ScVbaFormatCondition_BASE::Operator( sal_True ); } -void +void ScVbaFormatCondition::notifyRange() throw ( script::BasicErrorException ) { try @@ -157,14 +157,14 @@ ScVbaFormatCondition::notifyRange() throw ( script::BasicErrorException ) } } -rtl::OUString& +rtl::OUString& ScVbaFormatCondition::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaFormatCondition") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > ScVbaFormatCondition::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sc/source/ui/vba/vbaformatcondition.hxx b/sc/source/ui/vba/vbaformatcondition.hxx index aa1a3e5bb740..75706878d1c3 100644 --- a/sc/source/ui/vba/vbaformatcondition.hxx +++ b/sc/source/ui/vba/vbaformatcondition.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -30,10 +30,10 @@ #include <ooo/vba/excel/XFormatCondition.hpp> #include <ooo/vba/excel/XFormatConditions.hpp> #include <ooo/vba/excel/XStyle.hpp> -#include <com/sun/star/frame/XModel.hpp> +#include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/sheet/XSheetConditionalEntries.hpp> #include <com/sun/star/sheet/XSheetConditionalEntry.hpp> -#include <com/sun/star/sheet/XSheetCondition.hpp> +#include <com/sun/star/sheet/XSheetCondition.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include "vbacondition.hxx" @@ -42,8 +42,8 @@ class ScVbaFormatCondition : public ScVbaFormatCondition_BASE { protected: rtl::OUString msStyleName; - css::uno::Reference< css::sheet::XSheetConditionalEntry > mxSheetConditionalEntry; - css::uno::Reference< css::sheet::XSheetConditionalEntries > mxSheetConditionalEntries; + css::uno::Reference< css::sheet::XSheetConditionalEntry > mxSheetConditionalEntry; + css::uno::Reference< css::sheet::XSheetConditionalEntries > mxSheetConditionalEntries; css::uno::Reference< ov::excel::XFormatConditions> moFormatConditions; css::uno::Reference< ov::excel::XStyle > mxStyle; css::uno::Reference< css::beans::XPropertySet > mxParentRangePropertySet; @@ -68,6 +68,6 @@ public: virtual rtl::OUString& getServiceImplName(); virtual css::uno::Sequence<rtl::OUString> getServiceNames(); }; -#endif +#endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/vba/vbaformatconditions.cxx b/sc/source/ui/vba/vbaformatconditions.cxx index 6eda5c654238..26dcaac89040 100644 --- a/sc/source/ui/vba/vbaformatconditions.cxx +++ b/sc/source/ui/vba/vbaformatconditions.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -53,12 +53,12 @@ ScVbaFormatConditions::ScVbaFormatConditions( const uno::Reference< XHelperInter mxStyles.set( xApp->getThisWorkbook()->Styles( uno::Any() ), uno::UNO_QUERY_THROW ); uno::Reference< sheet::XCellRangeAddressable > xCellRange( mxRangeParent->getCellRange(), uno::UNO_QUERY_THROW ); mxParentRangePropertySet.set( xCellRange, uno::UNO_QUERY_THROW ); - + table::CellRangeAddress rangeAddress = xCellRange->getRangeAddress(); maCellAddress = table::CellAddress( rangeAddress.Sheet, rangeAddress.StartColumn, rangeAddress.StartRow ); } -void SAL_CALL +void SAL_CALL ScVbaFormatConditions::Delete( ) throw (script::BasicErrorException, uno::RuntimeException) { try @@ -71,7 +71,7 @@ ScVbaFormatConditions::Delete( ) throw (script::BasicErrorException, uno::Runti { uno::Reference< sheet::XSheetConditionalEntry > xSheetConditionalEntry( mxSheetConditionalEntries->getByIndex(i), uno::UNO_QUERY_THROW ); pStyles->Delete(xSheetConditionalEntry->getStyleName()); - mxSheetConditionalEntries->removeByIndex(i); + mxSheetConditionalEntries->removeByIndex(i); } notifyRange(); } @@ -81,24 +81,24 @@ ScVbaFormatConditions::Delete( ) throw (script::BasicErrorException, uno::Runti } } -uno::Type SAL_CALL +uno::Type SAL_CALL ScVbaFormatConditions::getElementType() throw (css::uno::RuntimeException) { return excel::XFormatCondition::static_type(0); } -uno::Any xSheetConditionToFormatCondition( const uno::Reference< XHelperInterface >& xRangeParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< excel::XStyles >& xStyles, const uno::Reference< excel::XFormatConditions >& xFormatConditions, const uno::Reference< beans::XPropertySet >& xRangeProps, const uno::Any& aObject ) +uno::Any xSheetConditionToFormatCondition( const uno::Reference< XHelperInterface >& xRangeParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< excel::XStyles >& xStyles, const uno::Reference< excel::XFormatConditions >& xFormatConditions, const uno::Reference< beans::XPropertySet >& xRangeProps, const uno::Any& aObject ) { uno::Reference< sheet::XSheetConditionalEntry > xSheetConditionalEntry; aObject >>= xSheetConditionalEntry; uno::Reference< excel::XStyle > xStyle( xStyles->Item( uno::makeAny( xSheetConditionalEntry->getStyleName() ), uno::Any() ), uno::UNO_QUERY_THROW ); - uno::Reference< excel::XFormatCondition > xCondition = new ScVbaFormatCondition( xRangeParent, xContext, xSheetConditionalEntry, xStyle, xFormatConditions, xRangeProps ); + uno::Reference< excel::XFormatCondition > xCondition = new ScVbaFormatCondition( xRangeParent, xContext, xSheetConditionalEntry, xStyle, xFormatConditions, xRangeProps ); return uno::makeAny( xCondition ); } -uno::Any +uno::Any ScVbaFormatConditions::createCollectionObject(const uno::Any& aObject ) { return xSheetConditionToFormatCondition( uno::Reference< XHelperInterface >( mxRangeParent, uno::UNO_QUERY_THROW ), mxContext, mxStyles, this, mxParentRangePropertySet, aObject ); @@ -129,21 +129,21 @@ public: } }; -uno::Reference< excel::XFormatCondition > SAL_CALL +uno::Reference< excel::XFormatCondition > SAL_CALL ScVbaFormatConditions::Add( ::sal_Int32 _nType, const uno::Any& _aOperator, const uno::Any& _aFormula1, const uno::Any& _aFormula2 ) throw (script::BasicErrorException, uno::RuntimeException) { return Add( _nType, _aOperator, _aFormula1, _aFormula2, uno::Reference< excel::XStyle >() ); } -uno::Reference< excel::XFormatCondition > +uno::Reference< excel::XFormatCondition > ScVbaFormatConditions::Add( ::sal_Int32 _nType, const uno::Any& _aOperator, const uno::Any& _aFormula1, const uno::Any& _aFormula2, const css::uno::Reference< excel::XStyle >& _xStyle ) throw (script::BasicErrorException, uno::RuntimeException) { // #TODO - // #FIXME + // #FIXME // This method will NOT handle r1c1 formulas [*]and only assumes that // the formulas are _xlA1 based ( need to hook into calc work ths should // address this ) - // [*] reason: getA1Formula method below is just a hook and just + // [*] reason: getA1Formula method below is just a hook and just // returns whats it gets ( e.g. doesn't convert anything ) uno::Reference< excel::XStyle > xStyle( _xStyle ); uno::Reference< excel::XFormatCondition > xFormatCondition; @@ -151,7 +151,7 @@ ScVbaFormatConditions::Add( ::sal_Int32 _nType, const uno::Any& _aOperator, cons { rtl::OUString sStyleName; if ( !xStyle.is() ) - { + { sStyleName = getStyleName(); xStyle = mxStyles->Add(sStyleName, uno::Any() ); } @@ -173,12 +173,12 @@ ScVbaFormatConditions::Add( ::sal_Int32 _nType, const uno::Any& _aOperator, cons aPropertyValueVector.push_back( aProperty ); if ( _aFormula1.hasValue() ) - { + { beans::PropertyValue aProp( FORMULA1, 0, uno::makeAny( getA1Formula( _aFormula1 ) ), beans::PropertyState_DIRECT_VALUE ); aPropertyValueVector.push_back( aProp ); } if ( _aFormula2.hasValue() ) - { + { beans::PropertyValue aProp( FORMULA2, 0, uno::makeAny( getA1Formula( _aFormula2 ) ), beans::PropertyState_DIRECT_VALUE ); aPropertyValueVector.push_back( aProp ); } @@ -212,14 +212,14 @@ ScVbaFormatConditions::Add( ::sal_Int32 _nType, const uno::Any& _aOperator, cons } -uno::Reference< container::XEnumeration > SAL_CALL +uno::Reference< container::XEnumeration > SAL_CALL ScVbaFormatConditions::createEnumeration() throw (uno::RuntimeException) { return new EnumWrapper( m_xIndexAccess, mxRangeParent, mxContext, mxStyles, this, mxParentRangePropertySet ); } -void +void ScVbaFormatConditions::notifyRange() throw ( script::BasicErrorException ) { try @@ -232,7 +232,7 @@ ScVbaFormatConditions::notifyRange() throw ( script::BasicErrorException ) } } -rtl::OUString +rtl::OUString ScVbaFormatConditions::getA1Formula(const css::uno::Any& _aFormula) throw ( script::BasicErrorException ) { // #TODO, #FIXME hook-in proper formula conversion detection & logic @@ -242,7 +242,7 @@ ScVbaFormatConditions::getA1Formula(const css::uno::Any& _aFormula) throw ( scri return sFormula; } -rtl::OUString +rtl::OUString ScVbaFormatConditions::getStyleName() { ScVbaStyles* pStyles = static_cast< ScVbaStyles* >( mxStyles.get() ); @@ -252,7 +252,7 @@ ScVbaFormatConditions::getStyleName() return ContainerUtilities::getUniqueName(sCellStyleNames, sStyleNamePrefix, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("_") )); } -void +void ScVbaFormatConditions::removeFormatCondition( const rtl::OUString& _sStyleName, sal_Bool _bRemoveStyle) throw ( script::BasicErrorException ) { try @@ -281,14 +281,14 @@ ScVbaFormatConditions::removeFormatCondition( const rtl::OUString& _sStyleName, } } -rtl::OUString& +rtl::OUString& ScVbaFormatConditions::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaFormatConditions") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > ScVbaFormatConditions::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sc/source/ui/vba/vbaformatconditions.hxx b/sc/source/ui/vba/vbaformatconditions.hxx index dea8f4c45a62..e51ca233164d 100644 --- a/sc/source/ui/vba/vbaformatconditions.hxx +++ b/sc/source/ui/vba/vbaformatconditions.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -38,7 +38,7 @@ typedef CollTestImplHelper< ov::excel::XFormatConditions > ScVbaFormatConditions_BASE; class ScVbaFormatConditions: public ScVbaFormatConditions_BASE { - css::table::CellAddress maCellAddress; + css::table::CellAddress maCellAddress; css::uno::Reference< css::sheet::XSheetConditionalEntries > mxSheetConditionalEntries; css::uno::Reference< ov::excel::XStyles > mxStyles; css::uno::Reference< ov::excel::XRange > mxRangeParent; @@ -56,7 +56,7 @@ public: virtual css::uno::Reference< ov::excel::XFormatCondition > SAL_CALL Add( ::sal_Int32 Type, const css::uno::Any& Operator, const css::uno::Any& Formula1, const css::uno::Any& Formula2 ) throw (css::script::BasicErrorException, css::uno::RuntimeException); // XEnumerationAccess virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException); - virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException); + virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException); virtual css::uno::Any createCollectionObject(const css::uno::Any&); // XHelperInterface virtual rtl::OUString& getServiceImplName(); diff --git a/sc/source/ui/vba/vbaglobals.cxx b/sc/source/ui/vba/vbaglobals.cxx index e37a2bb933c0..b3e56cddb958 100644 --- a/sc/source/ui/vba/vbaglobals.cxx +++ b/sc/source/ui/vba/vbaglobals.cxx @@ -76,7 +76,7 @@ ScVbaGlobals::~ScVbaGlobals() uno::Reference<excel::XApplication > ScVbaGlobals::getApplication() throw (uno::RuntimeException) { -// OSL_TRACE("In ScVbaGlobals::getApplication"); +// OSL_TRACE("In ScVbaGlobals::getApplication"); if ( !mxApplication.is() ) mxApplication.set( new ScVbaApplication( mxContext) ); return mxApplication; @@ -94,7 +94,7 @@ ScVbaGlobals::getExcel() throw (uno::RuntimeException) uno::Reference< excel::XWorkbook > SAL_CALL ScVbaGlobals::getActiveWorkbook() throw (uno::RuntimeException) { -// OSL_TRACE("In ScVbaGlobals::getActiveWorkbook"); +// OSL_TRACE("In ScVbaGlobals::getActiveWorkbook"); uno::Reference< excel::XWorkbook > xWorkbook( getApplication()->getActiveWorkbook(), uno::UNO_QUERY); if ( xWorkbook.is() ) { diff --git a/sc/source/ui/vba/vbaglobals.hxx b/sc/source/ui/vba/vbaglobals.hxx index a320ebdf94f6..dc7518ad64c2 100644 --- a/sc/source/ui/vba/vbaglobals.hxx +++ b/sc/source/ui/vba/vbaglobals.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -51,7 +51,7 @@ typedef ::cppu::ImplInheritanceHelper1< VbaGlobalsBase, ov::excel::XGlobals > Sc ov::excel::XApplication > SAL_CALL getApplication() throw (css::uno::RuntimeException); public: - + ScVbaGlobals( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& rxContext ); //ScVbaGlobals( @@ -94,6 +94,6 @@ typedef ::cppu::ImplInheritanceHelper1< VbaGlobalsBase, ov::excel::XGlobals > Sc virtual rtl::OUString& getServiceImplName(); virtual css::uno::Sequence<rtl::OUString> getServiceNames(); }; -#endif // +#endif // /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/vba/vbahelper.cxx b/sc/source/ui/vba/vbahelper.cxx index 62d71a08f4fc..bc1b07d738ab 100644 --- a/sc/source/ui/vba/vbahelper.cxx +++ b/sc/source/ui/vba/vbahelper.cxx @@ -719,32 +719,32 @@ UserFormGeometryHelper::UserFormGeometryHelper( const uno::Reference< uno::XComp double UserFormGeometryHelper::getTop() { sal_Int32 nTop = 0; - mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_TOP ) ) ) >>= nTop; + mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_TOP ) ) ) >>= nTop; return Millimeter::getInPoints( nTop ); } void UserFormGeometryHelper::setTop( double nTop ) { - mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_TOP ) ), uno::makeAny( Millimeter::getInHundredthsOfOneMillimeter( nTop ) ) ); + mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_TOP ) ), uno::makeAny( Millimeter::getInHundredthsOfOneMillimeter( nTop ) ) ); } double UserFormGeometryHelper::getHeight() { sal_Int32 nHeight = 0; - mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_CELLHGT ) ) ) >>= nHeight; + mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_CELLHGT ) ) ) >>= nHeight; return Millimeter::getInPoints( nHeight ); } void UserFormGeometryHelper::setHeight( double nHeight ) { - mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_CELLHGT ) ), uno::makeAny( Millimeter::getInHundredthsOfOneMillimeter( nHeight ) ) ); + mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_CELLHGT ) ), uno::makeAny( Millimeter::getInHundredthsOfOneMillimeter( nHeight ) ) ); } double UserFormGeometryHelper::getWidth() { sal_Int32 nWidth = 0; - mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_CELLWID ) ) ) >>= nWidth; + mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_CELLWID ) ) ) >>= nWidth; return Millimeter::getInPoints( nWidth ); } void UserFormGeometryHelper::setWidth( double nWidth) { - mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_CELLWID ) ), uno::makeAny( Millimeter::getInHundredthsOfOneMillimeter( nWidth ) ) ); + mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_CELLWID ) ), uno::makeAny( Millimeter::getInHundredthsOfOneMillimeter( nWidth ) ) ); } SfxItemSet* diff --git a/sc/source/ui/vba/vbahyperlink.cxx b/sc/source/ui/vba/vbahyperlink.cxx index 2f3c5703203f..4499a1183400 100644 --- a/sc/source/ui/vba/vbahyperlink.cxx +++ b/sc/source/ui/vba/vbahyperlink.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -31,7 +31,7 @@ #include <com/sun/star/container/XIndexAccess.hpp> #include <com/sun/star/text/XText.hpp> #include <com/sun/star/text/XTextFieldsSupplier.hpp> -#include <com/sun/star/container/XEnumerationAccess.hpp> +#include <com/sun/star/container/XEnumerationAccess.hpp> #include <ooo/vba/office/MsoHyperlinkType.hpp> #include <ooo/vba/msforms/XShape.hpp> #include "vbarange.hxx" diff --git a/sc/source/ui/vba/vbahyperlink.hxx b/sc/source/ui/vba/vbahyperlink.hxx index 36df21cf324c..1e74707c2397 100644 --- a/sc/source/ui/vba/vbahyperlink.hxx +++ b/sc/source/ui/vba/vbahyperlink.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -25,7 +25,7 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ - + #ifndef SC_VBA_HYPERLINK_HXX #define SC_VBA_HYPERLINK_HXX @@ -38,7 +38,7 @@ typedef InheritedHelperInterfaceImpl1< ov::excel::XHyperlink > HyperlinkImpl_BASE; -class ScVbaHyperlink : public HyperlinkImpl_BASE +class ScVbaHyperlink : public HyperlinkImpl_BASE { public: ScVbaHyperlink( diff --git a/sc/source/ui/vba/vbahyperlinks.cxx b/sc/source/ui/vba/vbahyperlinks.cxx index 083607ff345d..686f636669c8 100644 --- a/sc/source/ui/vba/vbahyperlinks.cxx +++ b/sc/source/ui/vba/vbahyperlinks.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -25,7 +25,7 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ - + #include "vbahyperlinks.hxx" #include <algorithm> #include <vector> @@ -89,7 +89,7 @@ bool EqualAnchorFunctor::operator()( const uno::Reference< excel::XHyperlink >& sal_Int32 nType = rxHlink->getType(); if( nType != mnType ) return false; - + switch( nType ) { case office::MsoHyperlinkType::msoHyperlinkRange: @@ -126,7 +126,7 @@ public: /** Inserts the passed hyperlink into the collection. Will remove a Hyperlink object with the same anchor as the passed Hyperlink object. */ void insertHyperlink( const uno::Reference< excel::XHyperlink >& rxHlink ) throw (uno::RuntimeException); - + // XIndexAccess virtual sal_Int32 SAL_CALL getCount() throw (uno::RuntimeException); virtual uno::Any SAL_CALL getByIndex( sal_Int32 nIndex ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException); @@ -134,7 +134,7 @@ public: // XElementAccess virtual uno::Type SAL_CALL getElementType() throw (uno::RuntimeException); virtual sal_Bool SAL_CALL hasElements() throw (uno::RuntimeException); - + private: typedef ::std::vector< uno::Reference< excel::XHyperlink > > HyperlinkVector; HyperlinkVector maHlinks; @@ -252,7 +252,7 @@ uno::Reference< excel::XHyperlink > SAL_CALL ScVbaHyperlinks::Add( the spreadsheet document. Parent of the Hyperlink is the anchor object. */ uno::Reference< excel::XHyperlink > xHlink( new ScVbaHyperlink( xAnchor, mxContext, rAddress, rSubAddress, rScreenTip, rTextToDisplay ) ); - + /* If creation of the hyperlink did not throw, insert it into the collection. */ mxContainer->insertHyperlink( xHlink ); diff --git a/sc/source/ui/vba/vbahyperlinks.hxx b/sc/source/ui/vba/vbahyperlinks.hxx index 161b236e26fe..37dab9dd886a 100644 --- a/sc/source/ui/vba/vbahyperlinks.hxx +++ b/sc/source/ui/vba/vbahyperlinks.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -25,7 +25,7 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ - + #ifndef SC_VBA_HYPERLINKS_HXX #define SC_VBA_HYPERLINKS_HXX @@ -68,7 +68,7 @@ typedef CollTestImplHelper< ov::excel::XHyperlinks > ScVbaHyperlinks_BASE; Worksheet object, it will always represent the current set of all hyperlinks existing in the sheet. Insertion and deletion of hyperlinks will be reflected by the instance. - + When a Hyperlinks collection object has been constructed from a VBA Range object, it will represent the set of hyperlinks that have existed at its construction time, and that are located completely inside the range(s) @@ -77,9 +77,9 @@ typedef CollTestImplHelper< ov::excel::XHyperlinks > ScVbaHyperlinks_BASE; hyperlinks it has been constructed with, even if they no longer exist. Furthermore, the instance will not offer hyperlinks inserted later, even if the instance itself has been used to insert the new hyperlinks. - + VBA code example: - + With ThisWorkbook.Worksheets(1) Set hlinks = .Hyperlinks ' global Hyperlinks object @@ -132,7 +132,7 @@ public: // XEnumerationAccess virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException); - + // XElementAccess virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException); diff --git a/sc/source/ui/vba/vbainterior.cxx b/sc/source/ui/vba/vbainterior.cxx index 733f394fabd4..f3ea1b0f53dd 100644 --- a/sc/source/ui/vba/vbainterior.cxx +++ b/sc/source/ui/vba/vbainterior.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -96,17 +96,17 @@ ScVbaInterior::ScVbaInterior( const uno::Reference< XHelperInterface >& xParent, m_aPattColor.SetColor( (sal_uInt32)0x0 ); m_nPattern = 0L; if ( !m_xProps.is() ) - throw lang::IllegalArgumentException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "properties") ), uno::Reference< uno::XInterface >(), 2 ); + throw lang::IllegalArgumentException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "properties") ), uno::Reference< uno::XInterface >(), 2 ); } uno::Any -ScVbaInterior::getColor() throw (uno::RuntimeException) +ScVbaInterior::getColor() throw (uno::RuntimeException) { Color aBackColor( GetBackColor() ); return uno::makeAny( OORGBToXLRGB( aBackColor.GetColor() ) ); } - -void + +void ScVbaInterior::setColor( const uno::Any& _color ) throw (uno::RuntimeException) { sal_Int32 nColor = 0; @@ -151,15 +151,15 @@ ScVbaInterior::SetMixedColor() uno::Reference< container::XIndexAccess > ScVbaInterior::getPalette() { - if ( !m_pScDoc ) + if ( !m_pScDoc ) throw uno::RuntimeException(); SfxObjectShell* pShell = m_pScDoc->GetDocumentShell(); - ScVbaPalette aPalette( pShell ); - return aPalette.getPalette(); + ScVbaPalette aPalette( pShell ); + return aPalette.getPalette(); } -void SAL_CALL -ScVbaInterior::setColorIndex( const css::uno::Any& _colorindex ) throw (css::uno::RuntimeException) +void SAL_CALL +ScVbaInterior::setColorIndex( const css::uno::Any& _colorindex ) throw (css::uno::RuntimeException) { sal_Int32 nIndex = 0; _colorindex >>= nIndex; @@ -205,16 +205,16 @@ ScVbaInterior::GetColorIndex( const sal_Int32 nColor ) nIndex = count + 1; // 1 based break; } - } + } return nIndex; } -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaInterior::getColorIndex() throw ( css::uno::RuntimeException ) { sal_Int32 nColor = 0; // hackly for excel::XlColorIndex::xlColorIndexNone - uno::Any aColor = m_xProps->getPropertyValue( BACKCOLOR ); + uno::Any aColor = m_xProps->getPropertyValue( BACKCOLOR ); if( ( aColor >>= nColor ) && ( nColor == -1 ) ) { nColor = excel::XlColorIndex::xlColorIndexNone; @@ -222,11 +222,11 @@ ScVbaInterior::getColorIndex() throw ( css::uno::RuntimeException ) } // getColor returns Xl ColorValue, need to convert it to OO val - // as the palette deals with OO RGB values - // #FIXME this is daft in getColor we convert OO RGB val to XL RGB val + // as the palette deals with OO RGB values + // #FIXME this is daft in getColor we convert OO RGB val to XL RGB val // and then back again to OO RGB value - XLRGBToOORGB( getColor() ) >>= nColor; - + XLRGBToOORGB( getColor() ) >>= nColor; + return uno::makeAny( GetColorIndex( nColor ) ); } Color @@ -246,7 +246,7 @@ ScVbaInterior::GetPatternColor( const Color& rPattColor, const Color& rBackColor Color ScVbaInterior::GetMixedColor( const Color& rFore, const Color& rBack, sal_uInt8 nTrans ) { - return Color( + return Color( nTrans, GetMixedColorComp( rFore.GetRed(), rBack.GetRed(), nTrans ), GetMixedColorComp( rFore.GetGreen(), rBack.GetGreen(), nTrans ), @@ -305,7 +305,7 @@ ScVbaInterior::SetUserDefinedAttributes( const rtl::OUString& sName, const uno:: } } // OOo do not support below API -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaInterior::getPattern() throw (uno::RuntimeException) { // XlPattern @@ -314,7 +314,7 @@ ScVbaInterior::getPattern() throw (uno::RuntimeException) return uno::makeAny( GetAttributeData( aPattern ) ); return uno::makeAny( excel::XlPattern::xlPatternNone ); } -void SAL_CALL +void SAL_CALL ScVbaInterior::setPattern( const uno::Any& _pattern ) throw (uno::RuntimeException) { if( _pattern >>= m_nPattern ) @@ -330,7 +330,7 @@ ScVbaInterior::GetBackColor() { sal_Int32 nColor = 0; Color aBackColor; - uno::Any aColor = GetUserDefinedAttributes( BACKCOLOR ); + uno::Any aColor = GetUserDefinedAttributes( BACKCOLOR ); if( aColor.hasValue() ) { nColor = GetAttributeData( aColor ); @@ -349,7 +349,7 @@ ScVbaInterior::GetBackColor() } return aBackColor; } -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaInterior::getPatternColor() throw (uno::RuntimeException) { // 0 is the default color. no filled. @@ -361,7 +361,7 @@ ScVbaInterior::getPatternColor() throw (uno::RuntimeException) } return uno::makeAny( sal_Int32( 0 ) ); } -void SAL_CALL +void SAL_CALL ScVbaInterior::setPatternColor( const uno::Any& _patterncolor ) throw (uno::RuntimeException) { sal_Int32 nPattColor = 0; @@ -373,15 +373,15 @@ ScVbaInterior::setPatternColor( const uno::Any& _patterncolor ) throw (uno::Runt else throw uno::RuntimeException( rtl::OUString::createFromAscii( "Invalid Pattern Color" ), uno::Reference< uno::XInterface >() ); } -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaInterior::getPatternColorIndex() throw (uno::RuntimeException) { sal_Int32 nColor = 0; - XLRGBToOORGB( getPatternColor() ) >>= nColor; - + XLRGBToOORGB( getPatternColor() ) >>= nColor; + return uno::makeAny( GetIndexColor( nColor ) ); } -void SAL_CALL +void SAL_CALL ScVbaInterior::setPatternColorIndex( const uno::Any& _patterncolorindex ) throw (uno::RuntimeException) { sal_Int32 nColorIndex = 0; @@ -397,14 +397,14 @@ ScVbaInterior::setPatternColorIndex( const uno::Any& _patterncolorindex ) throw throw uno::RuntimeException( rtl::OUString::createFromAscii( "Invalid Pattern Color" ), uno::Reference< uno::XInterface >() ); } -rtl::OUString& +rtl::OUString& ScVbaInterior::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaInterior") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > ScVbaInterior::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sc/source/ui/vba/vbainterior.hxx b/sc/source/ui/vba/vbainterior.hxx index 72b0f3748ffe..51b06e7d97c4 100644 --- a/sc/source/ui/vba/vbainterior.hxx +++ b/sc/source/ui/vba/vbainterior.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -48,9 +48,9 @@ class ScVbaInterior : public ScVbaInterior_BASE css::uno::Reference< css::beans::XPropertySet > m_xProps; ScDocument* m_pScDoc; Color m_aPattColor; - sal_Int32 m_nPattern; + sal_Int32 m_nPattern; - css::uno::Reference< css::container::XIndexAccess > getPalette(); + css::uno::Reference< css::container::XIndexAccess > getPalette(); css::uno::Reference< css::container::XNameContainer > GetAttributeContainer(); css::uno::Any SetAttributeData( sal_Int32 nValue ); sal_Int32 GetAttributeData( css::uno::Any aValue ); @@ -80,7 +80,7 @@ public: virtual css::uno::Any SAL_CALL getPatternColor() throw (css::uno::RuntimeException); virtual void SAL_CALL setPatternColor( const css::uno::Any& _patterncolor ) throw (css::uno::RuntimeException); virtual css::uno::Any SAL_CALL getPatternColorIndex() throw (css::uno::RuntimeException); - virtual void SAL_CALL setPatternColorIndex( const css::uno::Any& _patterncolorindex ) throw (css::uno::RuntimeException); + virtual void SAL_CALL setPatternColorIndex( const css::uno::Any& _patterncolorindex ) throw (css::uno::RuntimeException); //XHelperInterface virtual rtl::OUString& getServiceImplName(); virtual css::uno::Sequence<rtl::OUString> getServiceNames(); diff --git a/sc/source/ui/vba/vbaname.cxx b/sc/source/ui/vba/vbaname.cxx index 71d42038f89b..37170f60bb39 100644 --- a/sc/source/ui/vba/vbaname.cxx +++ b/sc/source/ui/vba/vbaname.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -43,12 +43,12 @@ using namespace ::ooo::vba; using namespace ::com::sun::star; -ScVbaName::ScVbaName(const css::uno::Reference< ov::XHelperInterface >& xParent, +ScVbaName::ScVbaName(const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XNamedRange >& xName, const css::uno::Reference< css::sheet::XNamedRanges >& xNames, const css::uno::Reference< css::frame::XModel >& xModel ): - NameImpl_BASE( xParent , xContext ), + NameImpl_BASE( xParent , xContext ), mxModel( xModel ), mxNamedRange( xName ), mxNames( xNames ) @@ -130,7 +130,7 @@ ScVbaName::getValue(const formula::FormulaGrammar::Grammar eGrammar) throw (css: return sValue; } -void +void ScVbaName::setValue( const ::rtl::OUString & rValue ) throw (css::uno::RuntimeException) { ::rtl::OUString sValue = rValue; @@ -145,25 +145,25 @@ ScVbaName::setValue( const ::rtl::OUString & rValue ) throw (css::uno::RuntimeEx mxNamedRange->setContent( sValue ); } -::rtl::OUString +::rtl::OUString ScVbaName::getRefersTo() throw (css::uno::RuntimeException) { return getValue(); } -void +void ScVbaName::setRefersTo( const ::rtl::OUString & rRefersTo ) throw (css::uno::RuntimeException) { setValue( rRefersTo ); } -::rtl::OUString +::rtl::OUString ScVbaName::getRefersToLocal() throw (css::uno::RuntimeException) { return getRefersTo(); } -void +void ScVbaName::setRefersToLocal( const ::rtl::OUString & rRefersTo ) throw (css::uno::RuntimeException) { setRefersTo( rRefersTo ); @@ -181,7 +181,7 @@ ScVbaName::setRefersToR1C1( const ::rtl::OUString & rRefersTo ) throw (css::uno: setRefersTo( rRefersTo ); } -::rtl::OUString +::rtl::OUString ScVbaName::getRefersToR1C1Local() throw (css::uno::RuntimeException) { return getValue( formula::FormulaGrammar::GRAM_NATIVE_XL_R1C1 ); @@ -209,7 +209,7 @@ ScVbaName::setRefersToRange( const css::uno::Reference< ov::excel::XRange > /*rR void ScVbaName::Delete() throw (css::uno::RuntimeException) { - mxNames->removeByName( mxNamedRange->getName() ); + mxNames->removeByName( mxNamedRange->getName() ); } rtl::OUString& diff --git a/sc/source/ui/vba/vbaname.hxx b/sc/source/ui/vba/vbaname.hxx index fc6d210ffa10..4ef4b3a13a39 100644 --- a/sc/source/ui/vba/vbaname.hxx +++ b/sc/source/ui/vba/vbaname.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -36,11 +36,11 @@ #include <formula/grammar.hxx> -class ScDocument; +class ScDocument; typedef InheritedHelperInterfaceImpl1< ov::excel::XName > NameImpl_BASE; -class ScVbaName : public NameImpl_BASE +class ScVbaName : public NameImpl_BASE { css::uno::Reference< css::frame::XModel > mxModel; css::uno::Reference< css::sheet::XNamedRange > mxNamedRange; diff --git a/sc/source/ui/vba/vbanames.hxx b/sc/source/ui/vba/vbanames.hxx index a3fddb13286d..de9b2d862e56 100644 --- a/sc/source/ui/vba/vbanames.hxx +++ b/sc/source/ui/vba/vbanames.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -43,13 +43,13 @@ class ScVbaNames : public ScVbaNames_BASE { css::uno::Reference< css::frame::XModel > mxModel; css::uno::Reference< css::sheet::XNamedRanges > mxNames; - + protected: virtual css::uno::Reference< css::frame::XModel > getModel() { return mxModel; } public: ScVbaNames( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XNamedRanges >& xNames , const css::uno::Reference< css::frame::XModel >& xModel ); - + ScDocument* getScDocument(); ScDocShell* getScDocShell(); @@ -60,7 +60,7 @@ public: virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException); // Methods - virtual css::uno::Any SAL_CALL Add( const css::uno::Any& aName , + virtual css::uno::Any SAL_CALL Add( const css::uno::Any& aName , const css::uno::Any& aRefersTo, const css::uno::Any& aVisible, const css::uno::Any& aMacroType, @@ -71,7 +71,7 @@ public: const css::uno::Any& aCategoryLocal, const css::uno::Any& aRefersToR1C1, const css::uno::Any& aRefersToR1C1Local ) throw (css::uno::RuntimeException); - + virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); // ScVbaNames_BASE diff --git a/sc/source/ui/vba/vbaoleobject.cxx b/sc/source/ui/vba/vbaoleobject.cxx index ebf87bf5275d..2d8347bdbd8b 100644 --- a/sc/source/ui/vba/vbaoleobject.cxx +++ b/sc/source/ui/vba/vbaoleobject.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -65,94 +65,94 @@ ScVbaOLEObject::ScVbaOLEObject( const uno::Reference< XHelperInterface >& xParen m_xControl.set( xControlProvider->createControl( xControlShape, xModel ) ); } -uno::Reference< uno::XInterface > SAL_CALL +uno::Reference< uno::XInterface > SAL_CALL ScVbaOLEObject::getObject() throw (uno::RuntimeException) { return uno::Reference< uno::XInterface >( m_xControl, uno::UNO_QUERY_THROW ); } -sal_Bool SAL_CALL +sal_Bool SAL_CALL ScVbaOLEObject::getEnabled() throw (uno::RuntimeException) { return m_xControl->getEnabled(); } -void SAL_CALL +void SAL_CALL ScVbaOLEObject::setEnabled( sal_Bool _enabled ) throw (uno::RuntimeException) { m_xControl->setEnabled( _enabled ); } -sal_Bool SAL_CALL +sal_Bool SAL_CALL ScVbaOLEObject::getVisible() throw (uno::RuntimeException) { OSL_TRACE("OleObject %s returning visible %s", rtl::OUStringToOString( m_xControl->getName(), RTL_TEXTENCODING_UTF8 ).getStr(), m_xControl->getVisible() ? "true" : "false" ); return m_xControl->getVisible(); } -void SAL_CALL +void SAL_CALL ScVbaOLEObject::setVisible( sal_Bool _visible ) throw (uno::RuntimeException) { OSL_TRACE("OleObject %s set visible %s", rtl::OUStringToOString( m_xControl->getName(), RTL_TEXTENCODING_UTF8 ).getStr(), _visible ? "true" : "false" ); m_xControl->setVisible( _visible ); } -double SAL_CALL +double SAL_CALL ScVbaOLEObject::getLeft() throw (uno::RuntimeException) { return m_xControl->getLeft(); } -void SAL_CALL +void SAL_CALL ScVbaOLEObject::setLeft( double _left ) throw (uno::RuntimeException) { m_xControl->setLeft( _left ); } -double SAL_CALL +double SAL_CALL ScVbaOLEObject::getTop() throw (uno::RuntimeException) { return m_xControl->getTop(); } -void SAL_CALL +void SAL_CALL ScVbaOLEObject::setTop( double _top ) throw (uno::RuntimeException) { m_xControl->setTop( _top ); } -double SAL_CALL +double SAL_CALL ScVbaOLEObject::getHeight() throw (uno::RuntimeException) { return m_xControl->getHeight(); } -void SAL_CALL +void SAL_CALL ScVbaOLEObject::setHeight( double _height ) throw (uno::RuntimeException) { m_xControl->setHeight( _height ); } -double SAL_CALL +double SAL_CALL ScVbaOLEObject::getWidth() throw (uno::RuntimeException) { return m_xControl->getWidth(); } -void SAL_CALL +void SAL_CALL ScVbaOLEObject::setWidth( double _width ) throw (uno::RuntimeException) { m_xControl->setWidth( _width ); } -rtl::OUString& +rtl::OUString& ScVbaOLEObject::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaOLEObject") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > ScVbaOLEObject::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sc/source/ui/vba/vbaoleobject.hxx b/sc/source/ui/vba/vbaoleobject.hxx index e329789cd7a4..da0630282506 100644 --- a/sc/source/ui/vba/vbaoleobject.hxx +++ b/sc/source/ui/vba/vbaoleobject.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -62,7 +62,7 @@ public: virtual void SAL_CALL setHeight( double _height ) throw (css::uno::RuntimeException); virtual double SAL_CALL getWidth() throw (css::uno::RuntimeException); virtual void SAL_CALL setWidth( double _width ) throw (css::uno::RuntimeException); - + }; #endif //SC_VBA_OLEOBJECT_HXX diff --git a/sc/source/ui/vba/vbaoleobjects.cxx b/sc/source/ui/vba/vbaoleobjects.cxx index 84cba7b96e92..bbb88d9b7680 100644 --- a/sc/source/ui/vba/vbaoleobjects.cxx +++ b/sc/source/ui/vba/vbaoleobjects.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -44,7 +44,7 @@ class IndexAccessWrapper : public XIndexAccess_BASE typedef std::vector< uno::Reference< drawing::XControlShape > > OLEObjects; OLEObjects vObjects; public: - IndexAccessWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess ) + IndexAccessWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess ) { sal_Int32 nLen = xIndexAccess->getCount(); for ( sal_Int32 index = 0; index < nLen; ++index ) @@ -64,7 +64,7 @@ public: { if ( Index < 0 || Index >= getCount() ) throw lang::IndexOutOfBoundsException(); - return uno::makeAny( vObjects[ Index ] ); + return uno::makeAny( vObjects[ Index ] ); } // Methods XElementAcess @@ -166,14 +166,14 @@ ScVbaOLEObjects::getElementType() throw (uno::RuntimeException) { return ooo::vba::excel::XOLEObject::static_type(0); } -rtl::OUString& +rtl::OUString& ScVbaOLEObjects::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaOLEObjects") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > ScVbaOLEObjects::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sc/source/ui/vba/vbaoleobjects.hxx b/sc/source/ui/vba/vbaoleobjects.hxx index c949d578422a..7ebbf4956734 100644 --- a/sc/source/ui/vba/vbaoleobjects.hxx +++ b/sc/source/ui/vba/vbaoleobjects.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -43,7 +43,7 @@ protected: virtual rtl::OUString& getServiceImplName(); virtual css::uno::Sequence<rtl::OUString> getServiceNames(); public: - ScVbaOLEObjects( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, + ScVbaOLEObjects( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess ); // XEnumerationAccess @@ -52,7 +52,7 @@ public: // ScVbaCollectionBaseImpl virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); - + }; #endif //SC_VBA_OLEOBJECTS_HXX diff --git a/sc/source/ui/vba/vbaoutline.cxx b/sc/source/ui/vba/vbaoutline.cxx index b42d81052d15..3d00b80ca0a5 100644 --- a/sc/source/ui/vba/vbaoutline.cxx +++ b/sc/source/ui/vba/vbaoutline.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -30,15 +30,15 @@ using namespace ::com::sun::star; using namespace ::ooo::vba; void -ScVbaOutline::ShowLevels( const uno::Any& RowLevels, const uno::Any& ColumnLevels ) throw (uno::RuntimeException) +ScVbaOutline::ShowLevels( const uno::Any& RowLevels, const uno::Any& ColumnLevels ) throw (uno::RuntimeException) { sal_Int16 nLevel = 0; - if (mxOutline.is()) + if (mxOutline.is()) { if (RowLevels >>= nLevel) { mxOutline->showLevel(nLevel, table::TableOrientation_ROWS); - } + } if (ColumnLevels >>= nLevel) { mxOutline->showLevel(nLevel,table::TableOrientation_COLUMNS); @@ -46,14 +46,14 @@ ScVbaOutline::ShowLevels( const uno::Any& RowLevels, const uno::Any& ColumnLevel } } -rtl::OUString& +rtl::OUString& ScVbaOutline::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaOutline") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > ScVbaOutline::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sc/source/ui/vba/vbaoutline.hxx b/sc/source/ui/vba/vbaoutline.hxx index 4b297a0a9079..4cc1c7386779 100644 --- a/sc/source/ui/vba/vbaoutline.hxx +++ b/sc/source/ui/vba/vbaoutline.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -36,7 +36,7 @@ typedef InheritedHelperInterfaceImpl1< ov::excel::XOutline > ScVbaOutline_BASE; -class ScVbaOutline : public ScVbaOutline_BASE +class ScVbaOutline : public ScVbaOutline_BASE { css::uno::Reference< css::sheet::XSheetOutline > mxOutline; public: @@ -44,7 +44,7 @@ public: css::uno::Reference<css::sheet::XSheetOutline> outline): ScVbaOutline_BASE( xParent, xContext) , mxOutline(outline) {} virtual ~ScVbaOutline(){} - + virtual void SAL_CALL ShowLevels( const css::uno::Any& RowLevels, const css::uno::Any& ColumnLevels ) throw (css::uno::RuntimeException) ; // XHelperInterface virtual rtl::OUString& getServiceImplName(); diff --git a/sc/source/ui/vba/vbapagebreak.cxx b/sc/source/ui/vba/vbapagebreak.cxx index 8c28aada76f4..813a5954d6e1 100644 --- a/sc/source/ui/vba/vbapagebreak.cxx +++ b/sc/source/ui/vba/vbapagebreak.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -32,7 +32,7 @@ using namespace ::com::sun::star; using namespace ::ooo::vba; template< typename Ifc1 > -ScVbaPageBreak<Ifc1>::ScVbaPageBreak( const uno::Reference< XHelperInterface >& xParent, +ScVbaPageBreak<Ifc1>::ScVbaPageBreak( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, uno::Reference< beans::XPropertySet >& xProps, sheet::TablePageBreakData aTablePageBreakData) throw (uno::RuntimeException): @@ -43,7 +43,7 @@ ScVbaPageBreak<Ifc1>::ScVbaPageBreak( const uno::Reference< XHelperInterface >& } template< typename Ifc1 > -sal_Int32 ScVbaPageBreak<Ifc1>::getType() throw (uno::RuntimeException) +sal_Int32 ScVbaPageBreak<Ifc1>::getType() throw (uno::RuntimeException) { uno::Any aValue = mxRowColPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsStartOfNewPage" ))); sal_Bool hasPageBreak = sal_False; @@ -51,17 +51,17 @@ sal_Int32 ScVbaPageBreak<Ifc1>::getType() throw (uno::RuntimeException) if( !hasPageBreak ) return excel::XlPageBreak::xlPageBreakNone; - + if( maTablePageBreakData.ManualBreak ) return excel::XlPageBreak::xlPageBreakManual; - + return excel::XlPageBreak::xlPageBreakAutomatic; } template< typename Ifc1 > -void ScVbaPageBreak<Ifc1>::setType(sal_Int32 type) throw (uno::RuntimeException) +void ScVbaPageBreak<Ifc1>::setType(sal_Int32 type) throw (uno::RuntimeException) { - if( (type != excel::XlPageBreak::xlPageBreakNone) && + if( (type != excel::XlPageBreak::xlPageBreakNone) && (type != excel::XlPageBreak::xlPageBreakManual) && (type != excel::XlPageBreak::xlPageBreakAutomatic) ) { @@ -95,7 +95,7 @@ uno::Reference< excel::XRange> ScVbaPageBreak<Ifc1>::Location() throw ( script:: } template< typename Ifc1 > -rtl::OUString& +rtl::OUString& ScVbaPageBreak<Ifc1>::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaPageBreak") ); @@ -103,7 +103,7 @@ ScVbaPageBreak<Ifc1>::getServiceImplName() } template< typename Ifc1 > -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > ScVbaPageBreak<Ifc1>::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; @@ -118,14 +118,14 @@ ScVbaPageBreak<Ifc1>::getServiceNames() template class ScVbaPageBreak< excel::XHPageBreak >; /* class ScVbaHPageBreak */ -rtl::OUString& +rtl::OUString& ScVbaHPageBreak::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaHPageBreak") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > ScVbaHPageBreak::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; @@ -140,26 +140,26 @@ ScVbaHPageBreak::getServiceNames() template class ScVbaPageBreak< excel::XVPageBreak >; /* class ScVbaVPageBreak */ -ScVbaVPageBreak::ScVbaVPageBreak( const css::uno::Reference< ov::XHelperInterface >& xParent, +ScVbaVPageBreak::ScVbaVPageBreak( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::beans::XPropertySet >& xProps, css::sheet::TablePageBreakData aTablePageBreakData ) throw ( css::uno::RuntimeException ) : ScVbaVPageBreak_BASE( xParent, xContext, xProps, aTablePageBreakData ) { } - + ScVbaVPageBreak::~ScVbaVPageBreak() { } -rtl::OUString& +rtl::OUString& ScVbaVPageBreak::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaVPageBreak") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > ScVbaVPageBreak::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sc/source/ui/vba/vbapagebreak.hxx b/sc/source/ui/vba/vbapagebreak.hxx index c047a8e3c06a..c0579787a4c6 100644 --- a/sc/source/ui/vba/vbapagebreak.hxx +++ b/sc/source/ui/vba/vbapagebreak.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -47,12 +47,12 @@ protected: css::uno::Reference< css::beans::XPropertySet > mxRowColPropertySet; css::sheet::TablePageBreakData maTablePageBreakData; public: - ScVbaPageBreak( const css::uno::Reference< ov::XHelperInterface >& xParent, + ScVbaPageBreak( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::beans::XPropertySet >& xProps, css::sheet::TablePageBreakData aTablePageBreakData) throw (css::uno::RuntimeException); virtual ~ScVbaPageBreak(){} - + virtual sal_Int32 SAL_CALL getType( ) throw (css::uno::RuntimeException); virtual void SAL_CALL setType(sal_Int32 type) throw (css::uno::RuntimeException); @@ -70,14 +70,14 @@ typedef ScVbaPageBreak < ov::excel::XHPageBreak > ScVbaHPageBreak_BASE; class ScVbaHPageBreak : public ScVbaHPageBreak_BASE { public: - ScVbaHPageBreak( const css::uno::Reference< ov::XHelperInterface >& xParent, + ScVbaHPageBreak( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::beans::XPropertySet >& xProps, css::sheet::TablePageBreakData aTablePageBreakData) throw (css::uno::RuntimeException): ScVbaHPageBreak_BASE( xParent,xContext,xProps,aTablePageBreakData ){} - + virtual ~ScVbaHPageBreak(){} - + // XHelperInterface virtual rtl::OUString& getServiceImplName(); virtual css::uno::Sequence<rtl::OUString> getServiceNames(); @@ -89,13 +89,13 @@ typedef ScVbaPageBreak < ov::excel::XVPageBreak > ScVbaVPageBreak_BASE; class ScVbaVPageBreak : public ScVbaVPageBreak_BASE { public: - ScVbaVPageBreak( const css::uno::Reference< ov::XHelperInterface >& xParent, + ScVbaVPageBreak( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::beans::XPropertySet >& xProps, css::sheet::TablePageBreakData aTablePageBreakData) throw (css::uno::RuntimeException); - + virtual ~ScVbaVPageBreak(); - + // XHelperInterface virtual rtl::OUString& getServiceImplName(); virtual css::uno::Sequence<rtl::OUString> getServiceNames(); diff --git a/sc/source/ui/vba/vbapagebreaks.hxx b/sc/source/ui/vba/vbapagebreaks.hxx index 5b8feb57c221..0230b2be0b58 100644 --- a/sc/source/ui/vba/vbapagebreaks.hxx +++ b/sc/source/ui/vba/vbapagebreaks.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -50,17 +50,17 @@ class ScVbaHPageBreaks : public ScVbaHPageBreaks_BASE { css::uno::Reference< css::sheet::XSheetPageBreak > mxSheetPageBreak; public: - ScVbaHPageBreaks( const css::uno::Reference< ov::XHelperInterface >& xParent, + ScVbaHPageBreaks( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::sheet::XSheetPageBreak >& xSheetPageBreak) throw (css::uno::RuntimeException); virtual ~ScVbaHPageBreaks(){} - // XHPageBreaks + // XHPageBreaks virtual css::uno::Any SAL_CALL Add( const css::uno::Any& Before) throw ( css::script::BasicErrorException, css::uno::RuntimeException); // XEnumerationAccess virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException); - virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException); + virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException); virtual css::uno::Any createCollectionObject(const css::uno::Any&); // XHelperInterface @@ -76,18 +76,18 @@ class ScVbaVPageBreaks : public ScVbaVPageBreaks_BASE css::uno::Reference< css::sheet::XSheetPageBreak > mxSheetPageBreak; public: - ScVbaVPageBreaks( const css::uno::Reference< ov::XHelperInterface >& xParent, + ScVbaVPageBreaks( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::sheet::XSheetPageBreak >& xSheetPageBreak ) throw ( css::uno::RuntimeException ); virtual ~ScVbaVPageBreaks(); - // XVPageBreaks + // XVPageBreaks virtual css::uno::Any SAL_CALL Add( const css::uno::Any& Before ) throw ( css::script::BasicErrorException, css::uno::RuntimeException ); // XEnumerationAccess virtual css::uno::Type SAL_CALL getElementType() throw ( css::uno::RuntimeException ); - virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw ( css::uno::RuntimeException ); + virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw ( css::uno::RuntimeException ); virtual css::uno::Any createCollectionObject( const css::uno::Any& ); // XHelperInterface diff --git a/sc/source/ui/vba/vbapagesetup.hxx b/sc/source/ui/vba/vbapagesetup.hxx index 57cc3dbbd153..9fc3a5b295d6 100644 --- a/sc/source/ui/vba/vbapagesetup.hxx +++ b/sc/source/ui/vba/vbapagesetup.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -38,16 +38,16 @@ typedef cppu::ImplInheritanceHelper1< VbaPageSetupBase, ov::excel::XPageSetup > ScVbaPageSetup_BASE; -class ScVbaPageSetup : public ScVbaPageSetup_BASE +class ScVbaPageSetup : public ScVbaPageSetup_BASE { css::uno::Reference< css::sheet::XSpreadsheet > mxSheet; public: - ScVbaPageSetup( const css::uno::Reference< ov::XHelperInterface >& xParent, + ScVbaPageSetup( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XSpreadsheet>& xSheet, - const css::uno::Reference< css::frame::XModel >& xModel) throw (css::uno::RuntimeException); + const css::uno::Reference< css::frame::XModel >& xModel) throw (css::uno::RuntimeException); virtual ~ScVbaPageSetup(){} - + // Attribute virtual rtl::OUString SAL_CALL getPrintArea() throw (css::uno::RuntimeException); virtual void SAL_CALL setPrintArea( const rtl::OUString& rAreas ) throw (css::uno::RuntimeException); diff --git a/sc/source/ui/vba/vbapalette.hxx b/sc/source/ui/vba/vbapalette.hxx index 2f5c752e3ebd..a1ec16979c96 100644 --- a/sc/source/ui/vba/vbapalette.hxx +++ b/sc/source/ui/vba/vbapalette.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -25,7 +25,7 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ - + #ifndef SC_VBAPALETTE_HXX #define SC_VBAPALETTE_HXX diff --git a/sc/source/ui/vba/vbapane.cxx b/sc/source/ui/vba/vbapane.cxx index e034ffeead41..ee32fc3e5286 100644 --- a/sc/source/ui/vba/vbapane.cxx +++ b/sc/source/ui/vba/vbapane.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -25,7 +25,7 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ - + #include "vbapane.hxx" #include <com/sun/star/sheet/XSpreadsheet.hpp> #include <com/sun/star/sheet/XSpreadsheetDocument.hpp> @@ -46,13 +46,13 @@ ScVbaPane::ScVbaPane( { } -sal_Int32 SAL_CALL +sal_Int32 SAL_CALL ScVbaPane::getScrollColumn() throw (uno::RuntimeException) { return ( m_xViewPane->getFirstVisibleColumn() + 1 ); } -void SAL_CALL +void SAL_CALL ScVbaPane::setScrollColumn( sal_Int32 _scrollcolumn ) throw (uno::RuntimeException) { if( _scrollcolumn < 1 ) @@ -63,13 +63,13 @@ ScVbaPane::setScrollColumn( sal_Int32 _scrollcolumn ) throw (uno::RuntimeExcepti m_xViewPane->setFirstVisibleColumn( _scrollcolumn - 1 ); } -sal_Int32 SAL_CALL +sal_Int32 SAL_CALL ScVbaPane::getScrollRow() throw (uno::RuntimeException) { return ( m_xViewPane->getFirstVisibleRow() + 1 ); } -void SAL_CALL +void SAL_CALL ScVbaPane::setScrollRow( sal_Int32 _scrollrow ) throw (uno::RuntimeException) { if( _scrollrow < 1 ) @@ -94,7 +94,7 @@ ScVbaPane::getVisibleRange() throw (uno::RuntimeException) } //Method -void SAL_CALL +void SAL_CALL ScVbaPane::SmallScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any& ToRight, const uno::Any& ToLeft ) throw (uno::RuntimeException) { rtl::OUString messageBuffer; @@ -137,7 +137,7 @@ ScVbaPane::SmallScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any if( messageBuffer.getLength() > 0 ) throw(uno::RuntimeException( messageBuffer, uno::Reference< uno::XInterface >() ) ); - sal_Int32 newStartRow = visibleRange.StartRow + downRows; + sal_Int32 newStartRow = visibleRange.StartRow + downRows; if( newStartRow < 0 ) newStartRow = 0; sal_Int32 newStartCol = visibleRange.StartColumn + rightCols; @@ -147,7 +147,7 @@ ScVbaPane::SmallScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any m_xViewPane->setFirstVisibleColumn( newStartCol ); } -void SAL_CALL +void SAL_CALL ScVbaPane::LargeScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any& ToRight, const uno::Any& ToLeft ) throw (uno::RuntimeException) { rtl::OUString messageBuffer; @@ -169,7 +169,7 @@ ScVbaPane::LargeScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any { sal_Int32 up = 0; if( Up >>= up ) - downPages -= up; + downPages -= up; else messageBuffer += rtl::OUString::createFromAscii( "Error getting parameter: Up\n" ); } diff --git a/sc/source/ui/vba/vbapane.hxx b/sc/source/ui/vba/vbapane.hxx index 27a9c3529545..841776a7d918 100644 --- a/sc/source/ui/vba/vbapane.hxx +++ b/sc/source/ui/vba/vbapane.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sc/source/ui/vba/vbapivottable.cxx b/sc/source/ui/vba/vbapivottable.cxx index cffd07eeb5e1..7d788b1ed321 100644 --- a/sc/source/ui/vba/vbapivottable.cxx +++ b/sc/source/ui/vba/vbapivottable.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -40,18 +40,18 @@ uno::Reference< excel::XPivotCache > ScVbaPivotTable::PivotCache() throw (uno::RuntimeException) { // #FIXME with a quick example failed to determine what the parent - // should be, leaving as null at the moment + // should be, leaving as null at the moment return new ScVbaPivotCache( uno::Reference< XHelperInterface >(), mxContext, m_xTable ); } -rtl::OUString& +rtl::OUString& ScVbaPivotTable::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaPivotTable") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > ScVbaPivotTable::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sc/source/ui/vba/vbapivottable.hxx b/sc/source/ui/vba/vbapivottable.hxx index 5f244a8ef95e..dd7201be6170 100644 --- a/sc/source/ui/vba/vbapivottable.hxx +++ b/sc/source/ui/vba/vbapivottable.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,7 +37,7 @@ typedef InheritedHelperInterfaceImpl1< ov::excel::XPivotTable > PivotTableImpl_BASE; class ScVbaPivotTable : public PivotTableImpl_BASE -{ +{ css::uno::Reference< css::sheet::XDataPilotTable > m_xTable; public: ScVbaPivotTable( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XDataPilotTable >& xTable ); diff --git a/sc/source/ui/vba/vbapivottables.cxx b/sc/source/ui/vba/vbapivottables.cxx index b7e090d1a841..3212ac27a1af 100644 --- a/sc/source/ui/vba/vbapivottables.cxx +++ b/sc/source/ui/vba/vbapivottables.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -45,14 +45,14 @@ class PivotTableEnumeration : public EnumerationHelperImpl public: PivotTableEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ) {} - virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) - { + virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) + { return DataPilotToPivotTable( m_xEnumeration->nextElement(), m_xContext ); } }; -ScVbaPivotTables::ScVbaPivotTables( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess ): ScVbaPivotTables_BASE( xParent, xContext, xIndexAccess ) +ScVbaPivotTables::ScVbaPivotTables( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess ): ScVbaPivotTables_BASE( xParent, xContext, xIndexAccess ) { } @@ -69,20 +69,20 @@ ScVbaPivotTables::createCollectionObject( const css::uno::Any& aSource ) return DataPilotToPivotTable( aSource, mxContext ); } -uno::Type +uno::Type ScVbaPivotTables::getElementType() throw (uno::RuntimeException) { return excel::XPivotTable::static_type(0); } -rtl::OUString& +rtl::OUString& ScVbaPivotTables::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaPivotTables") ); return sImplName; } -css::uno::Sequence<rtl::OUString> +css::uno::Sequence<rtl::OUString> ScVbaPivotTables::getServiceNames() { static uno::Sequence< rtl::OUString > sNames; diff --git a/sc/source/ui/vba/vbapivottables.hxx b/sc/source/ui/vba/vbapivottables.hxx index 4928756e179b..c511f064b229 100644 --- a/sc/source/ui/vba/vbapivottables.hxx +++ b/sc/source/ui/vba/vbapivottables.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -33,7 +33,7 @@ #include <ooo/vba/excel/XPivotTables.hpp> #include <com/sun/star/container/XEnumerationAccess.hpp> #include <com/sun/star/uno/XComponentContext.hpp> - + #include "excelvbahelper.hxx" #include <vbahelper/vbahelperinterface.hxx> #include <vbahelper/vbacollectionimpl.hxx> @@ -57,8 +57,8 @@ public: // XPivotTables // ScVbaPivotTables_BASE - virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); - + virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); + virtual rtl::OUString& getServiceImplName(); }; diff --git a/sc/source/ui/vba/vbapropvalue.cxx b/sc/source/ui/vba/vbapropvalue.cxx index 2fdbd16195fe..a850ef44269b 100644 --- a/sc/source/ui/vba/vbapropvalue.cxx +++ b/sc/source/ui/vba/vbapropvalue.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -28,18 +28,18 @@ #include "vbapropvalue.hxx" using namespace com::sun::star; - + ScVbaPropValue::ScVbaPropValue( PropListener* pListener ) : m_pListener( pListener ) { } -css::uno::Any SAL_CALL +css::uno::Any SAL_CALL ScVbaPropValue::getValue() throw (css::uno::RuntimeException) { return m_pListener->getValueEvent(); } -void SAL_CALL +void SAL_CALL ScVbaPropValue::setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException) { m_pListener->setValueEvent( _value ); diff --git a/sc/source/ui/vba/vbapropvalue.hxx b/sc/source/ui/vba/vbapropvalue.hxx index 289870e5b520..51608e8642ed 100644 --- a/sc/source/ui/vba/vbapropvalue.hxx +++ b/sc/source/ui/vba/vbapropvalue.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,15 +34,15 @@ typedef ::cppu::WeakImplHelper1< ov::XPropValue > PropValueImpl_BASE; -class PropListener +class PropListener { public: virtual void setValueEvent( const css::uno::Any& value ) = 0; - virtual css::uno::Any getValueEvent() = 0; + virtual css::uno::Any getValueEvent() = 0; }; -class ScVbaPropValue : public PropValueImpl_BASE +class ScVbaPropValue : public PropValueImpl_BASE { PropListener* m_pListener; public: diff --git a/sc/source/ui/vba/vbarange.hxx b/sc/source/ui/vba/vbarange.hxx index 46c60ac35e50..059d85502f3e 100644 --- a/sc/source/ui/vba/vbarange.hxx +++ b/sc/source/ui/vba/vbarange.hxx @@ -71,7 +71,7 @@ class ArrayVisitor { public: virtual void visitNode( sal_Int32 x, sal_Int32 y, const css::uno::Reference< css::table::XCell >& xCell ) = 0; - virtual ~ArrayVisitor(){} + virtual ~ArrayVisitor(){} }; class ValueSetter : public ArrayVisitor @@ -209,7 +209,7 @@ public: virtual void SAL_CALL FillRight() throw (css::uno::RuntimeException); virtual void SAL_CALL FillUp() throw (css::uno::RuntimeException); virtual void SAL_CALL FillDown() throw (css::uno::RuntimeException); - virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Offset( const css::uno::Any &nRowOffset, const css::uno::Any &nColOffset ) + virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Offset( const css::uno::Any &nRowOffset, const css::uno::Any &nColOffset ) throw (css::uno::RuntimeException); virtual css::uno::Reference< ov::excel::XRange > SAL_CALL CurrentRegion() throw (css::uno::RuntimeException); virtual css::uno::Reference< ov::excel::XRange > SAL_CALL CurrentArray() throw (css::uno::RuntimeException); diff --git a/sc/source/ui/vba/vbaseriescollection.cxx b/sc/source/ui/vba/vbaseriescollection.cxx index 1ccb7bda8f7f..794f91137092 100644 --- a/sc/source/ui/vba/vbaseriescollection.cxx +++ b/sc/source/ui/vba/vbaseriescollection.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -33,7 +33,7 @@ using namespace ::com::sun::star; using namespace ::ooo::vba; -ScVbaSeriesCollection::ScVbaSeriesCollection( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext ) : SeriesCollection_BASE( xParent, xContext, uno::Reference< container::XIndexAccess>() ) +ScVbaSeriesCollection::ScVbaSeriesCollection( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext ) : SeriesCollection_BASE( xParent, xContext, uno::Reference< container::XIndexAccess>() ) { } @@ -48,26 +48,26 @@ ScVbaSeriesCollection::createEnumeration() throw (uno::RuntimeException) // XElementAccess -uno::Type +uno::Type ScVbaSeriesCollection::getElementType() throw (uno::RuntimeException) { return excel::XSeries::static_type(0); } -uno::Any +uno::Any ScVbaSeriesCollection::createCollectionObject( const css::uno::Any& rSource ) { return rSource; } -rtl::OUString& +rtl::OUString& ScVbaSeriesCollection::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaSeriesCollection") ); return sImplName; } -css::uno::Sequence<rtl::OUString> +css::uno::Sequence<rtl::OUString> ScVbaSeriesCollection::getServiceNames() { static uno::Sequence< rtl::OUString > sNames; diff --git a/sc/source/ui/vba/vbaseriescollection.hxx b/sc/source/ui/vba/vbaseriescollection.hxx index 1b1d59e6157d..ddffda7ac375 100644 --- a/sc/source/ui/vba/vbaseriescollection.hxx +++ b/sc/source/ui/vba/vbaseriescollection.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,7 +37,7 @@ typedef CollTestImplHelper< ov::excel::XSeriesCollection > SeriesCollection_BASE; class ScVbaSeriesCollection : public SeriesCollection_BASE -{ +{ css::uno::Reference< css::uno::XComponentContext > m_xContext; public: @@ -47,7 +47,7 @@ public: virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException); // SeriesCollection_BASE - virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); + virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); virtual rtl::OUString& getServiceImplName(); virtual css::uno::Sequence<rtl::OUString> getServiceNames(); }; diff --git a/sc/source/ui/vba/vbasheetobject.cxx b/sc/source/ui/vba/vbasheetobject.cxx index 652c8e4f87b1..dc6c0e26a9ad 100644 --- a/sc/source/ui/vba/vbasheetobject.cxx +++ b/sc/source/ui/vba/vbasheetobject.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -486,7 +486,7 @@ sal_Int32 SAL_CALL ScVbaButton::getOrientation() throw (uno::RuntimeException) // not supported return excel::XlOrientation::xlHorizontal; } - + void SAL_CALL ScVbaButton::setOrientation( sal_Int32 /*nOrientation*/ ) throw (uno::RuntimeException) { // not supported diff --git a/sc/source/ui/vba/vbasheetobject.hxx b/sc/source/ui/vba/vbasheetobject.hxx index 245320e5be3b..928c9006e757 100644 --- a/sc/source/ui/vba/vbasheetobject.hxx +++ b/sc/source/ui/vba/vbasheetobject.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -170,7 +170,7 @@ public: protected: sal_Int32 getModelIndexInForm() const throw (css::uno::RuntimeException); - + protected: css::uno::Reference< css::container::XIndexContainer > mxFormIC; css::uno::Reference< css::beans::XPropertySet > mxControlProps; @@ -207,7 +207,7 @@ public: // XButton methods css::uno::Reference< ov::excel::XCharacters > SAL_CALL Characters( const css::uno::Any& rStart, const css::uno::Any& rLength ) throw (css::uno::RuntimeException); - + // XHelperInterface VBAHELPER_DECL_XHELPERINTERFACE diff --git a/sc/source/ui/vba/vbasheetobjects.cxx b/sc/source/ui/vba/vbasheetobjects.cxx index 3847209989f9..b05aa82722b8 100644 --- a/sc/source/ui/vba/vbasheetobjects.cxx +++ b/sc/source/ui/vba/vbasheetobjects.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -376,7 +376,7 @@ public: protected: uno::Reference< container::XIndexContainer > createForm() throw (uno::RuntimeException); - + virtual bool implPickShape( const uno::Reference< drawing::XShape >& rxShape ) const; virtual OUString implGetShapeServiceName() const; virtual bool implCheckProperties( const uno::Reference< beans::XPropertySet >& rxModelProps ) const; diff --git a/sc/source/ui/vba/vbasheetobjects.hxx b/sc/source/ui/vba/vbasheetobjects.hxx index 2a68d2251ad4..c59ec8882e91 100644 --- a/sc/source/ui/vba/vbasheetobjects.hxx +++ b/sc/source/ui/vba/vbasheetobjects.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -59,7 +59,7 @@ public: /** Updates the collection by fetching all shapes from the draw page. */ void collectShapes() throw (css::uno::RuntimeException); - + // XEnumerationAccess virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException); diff --git a/sc/source/ui/vba/vbastyle.cxx b/sc/source/ui/vba/vbastyle.cxx index 83d72dd99c05..2594effca2e0 100644 --- a/sc/source/ui/vba/vbastyle.cxx +++ b/sc/source/ui/vba/vbastyle.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -36,7 +36,7 @@ static rtl::OUString DISPLAYNAME( RTL_CONSTASCII_USTRINGPARAM("DisplayName") ); -uno::Reference< container::XNameAccess > +uno::Reference< container::XNameAccess > ScVbaStyle::getStylesNameContainer( const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException ) { uno::Reference< style::XStyleFamiliesSupplier > xStyleSupplier( xModel, uno::UNO_QUERY_THROW); @@ -44,26 +44,26 @@ ScVbaStyle::getStylesNameContainer( const uno::Reference< frame::XModel >& xMode return xStylesAccess; } -uno::Reference< beans::XPropertySet > +uno::Reference< beans::XPropertySet > lcl_getStyleProps( const rtl::OUString& sStyleName, const uno::Reference< frame::XModel >& xModel ) throw ( script::BasicErrorException, uno::RuntimeException ) { - - uno::Reference< beans::XPropertySet > xStyleProps( ScVbaStyle::getStylesNameContainer( xModel )->getByName( sStyleName ), uno::UNO_QUERY_THROW ); + + uno::Reference< beans::XPropertySet > xStyleProps( ScVbaStyle::getStylesNameContainer( xModel )->getByName( sStyleName ), uno::UNO_QUERY_THROW ); return xStyleProps; } void ScVbaStyle::initialise() throw ( uno::RuntimeException ) { - if (!mxModel.is() ) - DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XModel Interface could not be retrieved")) ); + if (!mxModel.is() ) + DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XModel Interface could not be retrieved")) ); uno::Reference< lang::XServiceInfo > xServiceInfo( mxPropertySet, uno::UNO_QUERY_THROW ); if ( !xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.style.CellStyle" ) ) ) ) { DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString() ); } mxStyle.set( mxPropertySet, uno::UNO_QUERY_THROW ); - + uno::Reference< style::XStyleFamiliesSupplier > xStyleSupplier( mxModel, uno::UNO_QUERY_THROW ); mxStyleFamilyNameContainer.set( ScVbaStyle::getStylesNameContainer( mxModel ), uno::UNO_QUERY_THROW ); @@ -94,25 +94,25 @@ ScVbaStyle::ScVbaStyle( const uno::Reference< XHelperInterface >& xParent, const } -::sal_Bool SAL_CALL +::sal_Bool SAL_CALL ScVbaStyle::BuiltIn() throw (script::BasicErrorException, uno::RuntimeException) { return !mxStyle->isUserDefined(); } -void SAL_CALL +void SAL_CALL ScVbaStyle::setName( const ::rtl::OUString& Name ) throw (script::BasicErrorException, uno::RuntimeException) { mxStyle->setName(Name); } -::rtl::OUString SAL_CALL +::rtl::OUString SAL_CALL ScVbaStyle::getName() throw (script::BasicErrorException, uno::RuntimeException) { return mxStyle->getName(); } -void SAL_CALL +void SAL_CALL ScVbaStyle::setNameLocal( const ::rtl::OUString& NameLocal ) throw (script::BasicErrorException, uno::RuntimeException) { try @@ -125,7 +125,7 @@ ScVbaStyle::setNameLocal( const ::rtl::OUString& NameLocal ) throw (script::Basi } } -::rtl::OUString SAL_CALL +::rtl::OUString SAL_CALL ScVbaStyle::getNameLocal() throw (script::BasicErrorException, uno::RuntimeException) { rtl::OUString sName; @@ -140,7 +140,7 @@ ScVbaStyle::getNameLocal() throw (script::BasicErrorException, uno::RuntimeExcep return sName; } -void SAL_CALL +void SAL_CALL ScVbaStyle::Delete() throw (script::BasicErrorException, uno::RuntimeException) { try @@ -153,13 +153,13 @@ ScVbaStyle::Delete() throw (script::BasicErrorException, uno::RuntimeException) } } -void SAL_CALL +void SAL_CALL ScVbaStyle::setMergeCells( const uno::Any& /*MergeCells*/ ) throw (script::BasicErrorException, uno::RuntimeException) { DebugHelper::exception(SbERR_NOT_IMPLEMENTED, rtl::OUString()); } -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaStyle::getMergeCells( ) throw (script::BasicErrorException, uno::RuntimeException) { DebugHelper::exception(SbERR_NOT_IMPLEMENTED, rtl::OUString()); diff --git a/sc/source/ui/vba/vbastyle.hxx b/sc/source/ui/vba/vbastyle.hxx index f98ecac1a163..c965146a1703 100644 --- a/sc/source/ui/vba/vbastyle.hxx +++ b/sc/source/ui/vba/vbastyle.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -83,12 +83,12 @@ public: virtual void SAL_CALL setLocked( const css::uno::Any& Locked ) throw (css::script::BasicErrorException, css::uno::RuntimeException);; virtual css::uno::Any SAL_CALL getLocked( ) throw (css::script::BasicErrorException, css::uno::RuntimeException);; virtual void SAL_CALL setFormulaHidden( const css::uno::Any& FormulaHidden ) throw (css::script::BasicErrorException, css::uno::RuntimeException);; -/ virtual css::uno::Any SAL_CALL getFormulaHidden( ) throw (css::script::BasicErrorException, css::uno::RuntimeException);; +/ virtual css::uno::Any SAL_CALL getFormulaHidden( ) throw (css::script::BasicErrorException, css::uno::RuntimeException);; virtual void SAL_CALL setMergeCells( const css::uno::Any& MergeCells ) throw (css::script::BasicErrorException, css::uno::RuntimeException) = 0; - virtual css::uno::Any SAL_CALL getMergeCells( ) throw (css::script::BasicErrorException, css::uno::RuntimeException) = 0; + virtual css::uno::Any SAL_CALL getMergeCells( ) throw (css::script::BasicErrorException, css::uno::RuntimeException) = 0; virtual void SAL_CALL setReadingOrder( const css::uno::Any& ReadingOrder ) throw (css::script::BasicErrorException, css::uno::RuntimeException);; virtual css::uno::Any SAL_CALL getReadingOrder( ) throw (css::script::BasicErrorException, css::uno::RuntimeException);; -*/ +*/ // XHelperInterface virtual rtl::OUString& getServiceImplName(); virtual css::uno::Sequence<rtl::OUString> getServiceNames(); diff --git a/sc/source/ui/vba/vbastyles.cxx b/sc/source/ui/vba/vbastyles.cxx index b07d98e81b80..1ffc2af27997 100644 --- a/sc/source/ui/vba/vbastyles.cxx +++ b/sc/source/ui/vba/vbastyles.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,7 +37,7 @@ css::uno::Any lcl_createAPIStyleToVBAObject( const css::uno::Any& aObject, const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ) { uno::Reference< beans::XPropertySet > xStyleProps( aObject, uno::UNO_QUERY_THROW ); - uno::Reference< excel::XStyle > xStyle( new ScVbaStyle( xParent, xContext, xStyleProps, xModel ) ); + uno::Reference< excel::XStyle > xStyle( new ScVbaStyle( xParent, xContext, xStyleProps, xModel ) ); return uno::makeAny( xStyle ); } @@ -45,30 +45,30 @@ lcl_createAPIStyleToVBAObject( const css::uno::Any& aObject, const uno::Referenc ScVbaStyles::ScVbaStyles( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< css::uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xModel ) throw ( script::BasicErrorException ) : ScVbaStyles_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( ScVbaStyle::getStylesNameContainer( xModel ), uno::UNO_QUERY_THROW ) ), mxModel( xModel ), mxParent( xParent ) { try - { + { mxMSF.set( mxModel, uno::UNO_QUERY_THROW ); mxNameContainerCellStyles.set( m_xNameAccess, uno::UNO_QUERY_THROW ); } - catch (uno::Exception& ) + catch (uno::Exception& ) { DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString()); } } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > ScVbaStyles::getStyleNames() throw ( uno::RuntimeException ) { return mxNameContainerCellStyles->getElementNames(); } -uno::Any +uno::Any ScVbaStyles::createCollectionObject(const uno::Any& aObject) { return lcl_createAPIStyleToVBAObject( aObject, mxParent, mxContext, mxModel ); } -uno::Type SAL_CALL +uno::Type SAL_CALL ScVbaStyles::getElementType() throw (uno::RuntimeException) { return excel::XStyle::static_type(0); @@ -96,13 +96,13 @@ public: } }; -uno::Reference< container::XEnumeration > SAL_CALL +uno::Reference< container::XEnumeration > SAL_CALL ScVbaStyles::createEnumeration() throw (uno::RuntimeException) { return new EnumWrapper( m_xIndexAccess, mxParent, mxContext, mxModel ); } -uno::Reference< excel::XStyle > SAL_CALL +uno::Reference< excel::XStyle > SAL_CALL ScVbaStyles::Add( const ::rtl::OUString& _sName, const uno::Any& _aBasedOn ) throw (script::BasicErrorException, uno::RuntimeException) { uno::Reference< excel::XStyle > aRet; @@ -149,7 +149,7 @@ ScVbaStyles::Add( const ::rtl::OUString& _sName, const uno::Any& _aBasedOn ) thr return aRet; } -void +void ScVbaStyles::Delete(const rtl::OUString _sStyleName) throw ( script::BasicErrorException ) { try diff --git a/sc/source/ui/vba/vbastyles.hxx b/sc/source/ui/vba/vbastyles.hxx index 821233f75ea0..b9677954463f 100644 --- a/sc/source/ui/vba/vbastyles.hxx +++ b/sc/source/ui/vba/vbastyles.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -35,7 +35,7 @@ typedef CollTestImplHelper< ov::excel::XStyles > ScVbaStyles_BASE; class ScVbaStyles: public ScVbaStyles_BASE { css::uno::Reference< css::frame::XModel > mxModel; - // hard ref to parent ( perhaps we should try this in the + // hard ref to parent ( perhaps we should try this in the // XHelperInterface itself css::uno::Reference< ov::XHelperInterface > mxParent; css::uno::Reference< css::lang::XMultiServiceFactory > mxMSF; @@ -48,13 +48,13 @@ public: virtual css::uno::Reference< ov::excel::XStyle > SAL_CALL Add( const ::rtl::OUString& Name, const css::uno::Any& BasedOn ) throw (css::script::BasicErrorException, css::uno::RuntimeException); // XEnumerationAccess virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException); - virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException); + virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException); virtual css::uno::Any createCollectionObject(const css::uno::Any&); // XHelperInterface virtual rtl::OUString& getServiceImplName(); virtual css::uno::Sequence<rtl::OUString> getServiceNames(); }; -#endif +#endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/vba/vbatextboxshape.cxx b/sc/source/ui/vba/vbatextboxshape.cxx index b5502fac9aa8..558d33111cd4 100644 --- a/sc/source/ui/vba/vbatextboxshape.cxx +++ b/sc/source/ui/vba/vbatextboxshape.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -40,19 +40,19 @@ ScVbaTextBoxShape::ScVbaTextBoxShape( const uno::Reference< uno::XComponentConte m_xModel.set( xModel ); } -rtl::OUString SAL_CALL +rtl::OUString SAL_CALL ScVbaTextBoxShape::getText() throw (css::uno::RuntimeException) { return m_xTextRange->getString(); } -void SAL_CALL +void SAL_CALL ScVbaTextBoxShape::setText( const rtl::OUString& _text ) throw (css::uno::RuntimeException) { m_xTextRange->setString( _text ); } -uno::Reference< excel::XCharacters > SAL_CALL +uno::Reference< excel::XCharacters > SAL_CALL ScVbaTextBoxShape::characters( const uno::Any& Start, const uno::Any& Length ) throw (uno::RuntimeException) { ScDocShell* pDocShell = excel::getDocShell( m_xModel ); diff --git a/sc/source/ui/vba/vbatextboxshape.hxx b/sc/source/ui/vba/vbatextboxshape.hxx index 02298cd767eb..0947bea6868c 100644 --- a/sc/source/ui/vba/vbatextboxshape.hxx +++ b/sc/source/ui/vba/vbatextboxshape.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,7 +42,7 @@ class ScVbaTextBoxShape : public TextBoxShapeImpl_BASE css::uno::Reference< css::frame::XModel > m_xModel; public: ScVbaTextBoxShape( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& xShape, const css::uno::Reference< css::drawing::XShapes >& xShapes, const css::uno::Reference< css::frame::XModel >& xModel ); - + // Attributes virtual rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException); virtual void SAL_CALL setText( const rtl::OUString& _text ) throw (css::uno::RuntimeException); diff --git a/sc/source/ui/vba/vbatextframe.cxx b/sc/source/ui/vba/vbatextframe.cxx index dffbed8b511f..c00af2d94775 100644 --- a/sc/source/ui/vba/vbatextframe.cxx +++ b/sc/source/ui/vba/vbatextframe.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -39,7 +39,7 @@ ScVbaTextFrame::ScVbaTextFrame( uno::Sequence< uno::Any> const & args, uno::Refe } // Methods -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaTextFrame::Characters() throw (uno::RuntimeException) { uno::Reference< text::XSimpleText > xSimpleText( m_xShape, uno::UNO_QUERY_THROW ); @@ -68,7 +68,7 @@ ScVbaTextFrame::getServiceNames() return aServiceNames; } -namespace textframe +namespace textframe { namespace sdecl = comphelper::service_decl; sdecl::vba_service_class_<ScVbaTextFrame, sdecl::with_args<true> > serviceImpl; diff --git a/sc/source/ui/vba/vbatextframe.hxx b/sc/source/ui/vba/vbatextframe.hxx index e45af4e1c2be..7e2b6b81ee88 100644 --- a/sc/source/ui/vba/vbatextframe.hxx +++ b/sc/source/ui/vba/vbatextframe.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sc/source/ui/vba/vbatitle.hxx b/sc/source/ui/vba/vbatitle.hxx index 1d89ea01e6d3..5e1594b8786c 100644 --- a/sc/source/ui/vba/vbatitle.hxx +++ b/sc/source/ui/vba/vbatitle.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -45,7 +45,7 @@ class TitleImpl : public InheritedHelperInterfaceImpl< Ifc1 > { typedef InheritedHelperInterfaceImpl< Ifc1 > BaseClass; -protected: +protected: css::uno::Reference< css::drawing::XShape > xTitleShape; css::uno::Reference< css::beans::XPropertySet > xShapePropertySet; std::auto_ptr<ov::ShapeHelper> oShapeHelper; @@ -101,7 +101,7 @@ public: // #FIXME #TODO the helperapi Characters implementation doesn't // seem to do very much, need to know how the existing Characters // impl ( that we use for Range ) can be reused - return css::uno::Reference< ov::excel::XCharacters > (); + return css::uno::Reference< ov::excel::XCharacters > (); } void SAL_CALL setTop( double Top ) throw (css::script::BasicErrorException, css::uno::RuntimeException) @@ -141,9 +141,9 @@ public: catch (css::uno::Exception& ) { throw css::script::BasicErrorException( rtl::OUString(), css::uno::Reference< css::uno::XInterface >(), SbERR_METHOD_FAILED, rtl::OUString() ); - } + } return static_cast< sal_Int32 >(nSOOrientation / 100) ; - } + } // XHelperInterface rtl::OUString& getServiceImplName() { diff --git a/sc/source/ui/vba/vbavalidation.cxx b/sc/source/ui/vba/vbavalidation.cxx index 36662c87c598..229e8f41c5cd 100644 --- a/sc/source/ui/vba/vbavalidation.cxx +++ b/sc/source/ui/vba/vbavalidation.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -68,7 +68,7 @@ lcl_getValidationProps( const uno::Reference< table::XCellRange >& xRange ) return xValProps; } -::sal_Bool SAL_CALL +::sal_Bool SAL_CALL ScVbaValidation::getIgnoreBlank() throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( lcl_getValidationProps( m_xRange ) ); @@ -77,74 +77,74 @@ ScVbaValidation::getIgnoreBlank() throw (uno::RuntimeException) return bBlank; } -void SAL_CALL +void SAL_CALL ScVbaValidation::setIgnoreBlank( ::sal_Bool _ignoreblank ) throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( lcl_getValidationProps( m_xRange ) ); - xProps->setPropertyValue( IGNOREBLANK, uno::makeAny( _ignoreblank ) ); - lcl_setValidationProps( m_xRange, xProps ); + xProps->setPropertyValue( IGNOREBLANK, uno::makeAny( _ignoreblank ) ); + lcl_setValidationProps( m_xRange, xProps ); } -::sal_Bool SAL_CALL +::sal_Bool SAL_CALL ScVbaValidation::getInCellDropdown() throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps = lcl_getValidationProps( m_xRange ); sal_Int32 nShowList = 0; - xProps->getPropertyValue( SHOWLIST ) >>= nShowList; + xProps->getPropertyValue( SHOWLIST ) >>= nShowList; return ( nShowList ? sal_True : sal_False ); } -void SAL_CALL +void SAL_CALL ScVbaValidation::setInCellDropdown( ::sal_Bool _incelldropdown ) throw (uno::RuntimeException) { sal_Int32 nDropDown = sal_False; if ( _incelldropdown ) nDropDown = 1; uno::Reference< beans::XPropertySet > xProps( lcl_getValidationProps(m_xRange) ); - xProps->setPropertyValue( SHOWLIST, uno::makeAny( nDropDown ) ); + xProps->setPropertyValue( SHOWLIST, uno::makeAny( nDropDown ) ); lcl_setValidationProps( m_xRange, xProps ); } -::sal_Bool SAL_CALL +::sal_Bool SAL_CALL ScVbaValidation::getShowInput() throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps = lcl_getValidationProps( m_xRange ); sal_Bool bShowInput = sal_False; - xProps->getPropertyValue( SHOWINPUT ) >>= bShowInput; + xProps->getPropertyValue( SHOWINPUT ) >>= bShowInput; return bShowInput; } -void SAL_CALL +void SAL_CALL ScVbaValidation:: setShowInput( ::sal_Bool _showinput ) throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( lcl_getValidationProps(m_xRange) ); - xProps->setPropertyValue( IGNOREBLANK, uno::makeAny( _showinput ) ); + xProps->setPropertyValue( IGNOREBLANK, uno::makeAny( _showinput ) ); lcl_setValidationProps( m_xRange, xProps ); } -::sal_Bool SAL_CALL +::sal_Bool SAL_CALL ScVbaValidation::getShowError() throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps = lcl_getValidationProps( m_xRange ); sal_Bool bShowError = sal_False; - xProps->getPropertyValue( SHOWERROR ) >>= bShowError; + xProps->getPropertyValue( SHOWERROR ) >>= bShowError; return bShowError; } -void SAL_CALL +void SAL_CALL ScVbaValidation::setShowError( ::sal_Bool _showerror ) throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( lcl_getValidationProps( m_xRange ) ); - xProps->setPropertyValue( SHOWERROR, uno::makeAny( _showerror ) ); + xProps->setPropertyValue( SHOWERROR, uno::makeAny( _showerror ) ); lcl_setValidationProps( m_xRange, xProps ); } -::rtl::OUString SAL_CALL +::rtl::OUString SAL_CALL ScVbaValidation::getErrorTitle() throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps = lcl_getValidationProps( m_xRange ); rtl::OUString sErrorTitle; - xProps->getPropertyValue( ERRORTITLE ) >>= sErrorTitle; + xProps->getPropertyValue( ERRORTITLE ) >>= sErrorTitle; return sErrorTitle; } @@ -152,63 +152,63 @@ void ScVbaValidation::setErrorTitle( const rtl::OUString& _errormessage ) throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( lcl_getValidationProps( m_xRange ) ); - xProps->setPropertyValue( ERRORTITLE, uno::makeAny( _errormessage ) ); + xProps->setPropertyValue( ERRORTITLE, uno::makeAny( _errormessage ) ); lcl_setValidationProps( m_xRange, xProps ); } -::rtl::OUString SAL_CALL +::rtl::OUString SAL_CALL ScVbaValidation::getInputMessage() throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps = lcl_getValidationProps( m_xRange ); rtl::OUString sMsg; - xProps->getPropertyValue( INPUTMESS ) >>= sMsg; + xProps->getPropertyValue( INPUTMESS ) >>= sMsg; return sMsg; } -void SAL_CALL +void SAL_CALL ScVbaValidation::setInputMessage( const ::rtl::OUString& _inputmessage ) throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( lcl_getValidationProps( m_xRange ) ); - xProps->setPropertyValue( INPUTMESS, uno::makeAny( _inputmessage ) ); + xProps->setPropertyValue( INPUTMESS, uno::makeAny( _inputmessage ) ); lcl_setValidationProps( m_xRange, xProps ); } -::rtl::OUString SAL_CALL +::rtl::OUString SAL_CALL ScVbaValidation::getInputTitle() throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps = lcl_getValidationProps( m_xRange ); rtl::OUString sString; - xProps->getPropertyValue( INPUTTITLE ) >>= sString; + xProps->getPropertyValue( INPUTTITLE ) >>= sString; return sString; } -void SAL_CALL +void SAL_CALL ScVbaValidation::setInputTitle( const ::rtl::OUString& _inputtitle ) throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( lcl_getValidationProps( m_xRange ) ); - xProps->setPropertyValue( INPUTTITLE, uno::makeAny( _inputtitle ) ); + xProps->setPropertyValue( INPUTTITLE, uno::makeAny( _inputtitle ) ); lcl_setValidationProps( m_xRange, xProps ); } -::rtl::OUString SAL_CALL +::rtl::OUString SAL_CALL ScVbaValidation::getErrorMessage() throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps = lcl_getValidationProps( m_xRange ); rtl::OUString sString; - xProps->getPropertyValue( ERRORMESS ) >>= sString; + xProps->getPropertyValue( ERRORMESS ) >>= sString; return sString; } -void SAL_CALL +void SAL_CALL ScVbaValidation::setErrorMessage( const ::rtl::OUString& _errormessage ) throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( lcl_getValidationProps( m_xRange ) ); - xProps->setPropertyValue( ERRORMESS, uno::makeAny( _errormessage ) ); + xProps->setPropertyValue( ERRORMESS, uno::makeAny( _errormessage ) ); lcl_setValidationProps( m_xRange, xProps ); } -void SAL_CALL +void SAL_CALL ScVbaValidation::Delete( ) throw (uno::RuntimeException) { rtl::OUString sBlank; @@ -220,7 +220,7 @@ ScVbaValidation::Delete( ) throw (uno::RuntimeException) xProps->setPropertyValue( ERRORTITLE, uno::makeAny( sBlank ) ); xProps->setPropertyValue( INPUTMESS, uno::makeAny( sBlank) ); xProps->setPropertyValue( ALERTSTYLE, uno::makeAny( sheet::ValidationAlertStyle_STOP) ); - xProps->setPropertyValue( STYPE, uno::makeAny( sheet::ValidationType_ANY ) ); + xProps->setPropertyValue( STYPE, uno::makeAny( sheet::ValidationType_ANY ) ); xCond->setFormula1( sBlank ); xCond->setFormula2( sBlank ); xCond->setOperator( sheet::ConditionOperator_NONE ); @@ -229,12 +229,12 @@ ScVbaValidation::Delete( ) throw (uno::RuntimeException) } // Fix the defect that validatation cannot work when the input should be limited between a lower bound and an upper bound -void SAL_CALL +void SAL_CALL ScVbaValidation::Add( const uno::Any& Type, const uno::Any& AlertStyle, const uno::Any& Operator, const uno::Any& Formula1, const uno::Any& Formula2 ) throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( lcl_getValidationProps( m_xRange ) ); uno::Reference< sheet::XSheetCondition > xCond( xProps, uno::UNO_QUERY_THROW ); - + sheet::ValidationType nValType = sheet::ValidationType_ANY; xProps->getPropertyValue( STYPE ) >>= nValType; if ( nValType != sheet::ValidationType_ANY ) @@ -243,7 +243,7 @@ ScVbaValidation::Add( const uno::Any& Type, const uno::Any& AlertStyle, const un if ( !Type.hasValue() || !( Type >>= nType ) ) throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "missing required param" ) ), uno::Reference< uno::XInterface >() ); - Delete(); // set up defaults + Delete(); // set up defaults rtl::OUString sFormula1; Formula1 >>= sFormula1; rtl::OUString sFormula2; @@ -252,25 +252,25 @@ ScVbaValidation::Add( const uno::Any& Type, const uno::Any& AlertStyle, const un { case excel::XlDVType::xlValidateList: { - // for validate list + // for validate list // at least formula1 is required if ( !Formula1.hasValue() ) throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "missing param" ) ), uno::Reference< uno::XInterface >() ); nValType = sheet::ValidationType_LIST; - xProps->setPropertyValue( STYPE, uno::makeAny(nValType )); + xProps->setPropertyValue( STYPE, uno::makeAny(nValType )); // #TODO validate required params // #TODO need to correct the ';' delimited formula on get/set break; } case excel::XlDVType::xlValidateWholeNumber: nValType = sheet::ValidationType_WHOLE; - xProps->setPropertyValue( STYPE, uno::makeAny(nValType )); - break; + xProps->setPropertyValue( STYPE, uno::makeAny(nValType )); + break; default: throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "unsupported operation..." ) ), uno::Reference< uno::XInterface >() ); } - sheet::ValidationAlertStyle eStyle = sheet::ValidationAlertStyle_STOP; + sheet::ValidationAlertStyle eStyle = sheet::ValidationAlertStyle_STOP; sal_Int32 nVbaAlertStyle = excel::XlDVAlertStyle::xlValidAlertStop; if ( AlertStyle.hasValue() && ( AlertStyle >>= nVbaAlertStyle ) ) { @@ -279,18 +279,18 @@ ScVbaValidation::Add( const uno::Any& Type, const uno::Any& AlertStyle, const un case excel::XlDVAlertStyle::xlValidAlertStop: // yes I know it's already defaulted but safer to assume // someone propbably could change the code above - eStyle = sheet::ValidationAlertStyle_STOP; - break; + eStyle = sheet::ValidationAlertStyle_STOP; + break; case excel::XlDVAlertStyle::xlValidAlertWarning: - eStyle = sheet::ValidationAlertStyle_WARNING; - break; + eStyle = sheet::ValidationAlertStyle_WARNING; + break; case excel::XlDVAlertStyle::xlValidAlertInformation: - eStyle = sheet::ValidationAlertStyle_INFO; - break; + eStyle = sheet::ValidationAlertStyle_INFO; + break; default: throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "bad param..." ) ), uno::Reference< uno::XInterface >() ); - } + } } xProps->setPropertyValue( ALERTSTYLE, uno::makeAny( eStyle ) ); @@ -306,32 +306,32 @@ ScVbaValidation::Add( const uno::Any& Type, const uno::Any& AlertStyle, const un xCond->setFormula1( sFormula1 ); if ( sFormula2.getLength() ) xCond->setFormula2( sFormula2 ); - - lcl_setValidationProps( m_xRange, xProps ); + + lcl_setValidationProps( m_xRange, xProps ); } -::rtl::OUString SAL_CALL +::rtl::OUString SAL_CALL ScVbaValidation::getFormula1() throw (uno::RuntimeException) { uno::Reference< sheet::XSheetCondition > xCond( lcl_getValidationProps( m_xRange ), uno::UNO_QUERY_THROW ); return xCond->getFormula1(); } -::rtl::OUString SAL_CALL +::rtl::OUString SAL_CALL ScVbaValidation::getFormula2() throw (uno::RuntimeException) { uno::Reference< sheet::XSheetCondition > xCond( lcl_getValidationProps( m_xRange ), uno::UNO_QUERY_THROW ); return xCond->getFormula2(); } -rtl::OUString& +rtl::OUString& ScVbaValidation::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaValidation") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > ScVbaValidation::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sc/source/ui/vba/vbavalidation.hxx b/sc/source/ui/vba/vbavalidation.hxx index 1ac0f3e35858..6ede46176544 100644 --- a/sc/source/ui/vba/vbavalidation.hxx +++ b/sc/source/ui/vba/vbavalidation.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -36,9 +36,9 @@ typedef InheritedHelperInterfaceImpl1<ov::excel::XValidation > ValidationImpl_BASE; class ScVbaValidation : public ValidationImpl_BASE -{ +{ css::uno::Reference< css::table::XCellRange > m_xRange; - + public: ScVbaValidation( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::table::XCellRange >& xRange ) : ValidationImpl_BASE( xParent, xContext ), m_xRange( xRange) {} // Attributes @@ -69,6 +69,6 @@ public: }; -#endif +#endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx index a31d348ff7c8..625666b236b9 100644 --- a/sc/source/ui/vba/vbawindow.cxx +++ b/sc/source/ui/vba/vbawindow.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -66,7 +66,7 @@ typedef ::cppu::WeakImplHelper1< container::XEnumeration > Enumeration_BASE; -typedef ::cppu::WeakImplHelper3< container::XEnumerationAccess +typedef ::cppu::WeakImplHelper3< container::XEnumerationAccess , com::sun::star::container::XIndexAccess , com::sun::star::container::XNameAccess > SelectedSheets_BASE; @@ -85,12 +85,12 @@ public: m_it = m_sheets.begin(); } // XEnumeration - virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException) - { + virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException) + { return m_it != m_sheets.end(); } - virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) - { + virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) + { if ( !hasMoreElements() ) { throw container::NoSuchElementException(); @@ -107,7 +107,7 @@ class SelectedSheetsEnumAccess : public SelectedSheets_BASE uno::Reference< uno::XComponentContext > m_xContext; NameIndexHash namesToIndices; Sheets sheets; - uno::Reference< frame::XModel > m_xModel; + uno::Reference< frame::XModel > m_xModel; public: SelectedSheetsEnumAccess( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ):m_xContext( xContext ), m_xModel( xModel ) { @@ -120,7 +120,7 @@ public: ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); if ( !pViewShell ) throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cannot obtain view shell" ) ), uno::Reference< uno::XInterface >() ); - + SCTAB nTabCount = pDocShell->GetDocument()->GetTableCount(); uno::Sequence<sal_Int32> aSheets( nTabCount ); SCTAB nIndex = 0; @@ -140,60 +140,60 @@ public: } } - + //XEnumerationAccess virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) throw (uno::RuntimeException) { - return new SelectedSheetsEnum( m_xContext, sheets, m_xModel ); + return new SelectedSheetsEnum( m_xContext, sheets, m_xModel ); } // XIndexAccess - virtual ::sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException) - { + virtual ::sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException) + { return sheets.size(); } - virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw ( lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException) - { + virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw ( lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException) + { if ( Index < 0 - || static_cast< Sheets::size_type >( Index ) >= sheets.size() ) + || static_cast< Sheets::size_type >( Index ) >= sheets.size() ) throw lang::IndexOutOfBoundsException(); - + return uno::makeAny( sheets[ Index ] ); } //XElementAccess virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException) - { - return excel::XWorksheet::static_type(0); + { + return excel::XWorksheet::static_type(0); } - virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException) - { + virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException) + { return (sheets.size() > 0); } //XNameAccess - virtual uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) - { + virtual uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) + { NameIndexHash::const_iterator it = namesToIndices.find( aName ); if ( it == namesToIndices.end() ) throw container::NoSuchElementException(); return uno::makeAny( sheets[ it->second ] ); - + } - virtual uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw (uno::RuntimeException) - { + virtual uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw (uno::RuntimeException) + { uno::Sequence< ::rtl::OUString > names( namesToIndices.size() ); ::rtl::OUString* pString = names.getArray(); NameIndexHash::const_iterator it = namesToIndices.begin(); NameIndexHash::const_iterator it_end = namesToIndices.end(); for ( ; it != it_end; ++it, ++pString ) - *pString = it->first; - return names; + *pString = it->first; + return names; } - virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (uno::RuntimeException) - { + virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (uno::RuntimeException) + { NameIndexHash::const_iterator it = namesToIndices.find( aName ); return (it != namesToIndices.end()); } @@ -239,19 +239,19 @@ ScVbaWindow::Scroll( const uno::Any& Down, const uno::Any& Up, const uno::Any& T m_xPane->SmallScroll( Down, Up, ToRight, ToLeft ); } -void SAL_CALL +void SAL_CALL ScVbaWindow::SmallScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any& ToRight, const uno::Any& ToLeft ) throw (uno::RuntimeException) { Scroll( Down, Up, ToRight, ToLeft ); } -void SAL_CALL +void SAL_CALL ScVbaWindow::LargeScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any& ToRight, const uno::Any& ToLeft ) throw (uno::RuntimeException) { Scroll( Down, Up, ToRight, ToLeft, true ); } -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaWindow::SelectedSheets( const uno::Any& aIndex ) throw (uno::RuntimeException) { uno::Reference< container::XEnumerationAccess > xEnumAccess( new SelectedSheetsEnumAccess( mxContext, m_xModel ) ); @@ -260,12 +260,12 @@ ScVbaWindow::SelectedSheets( const uno::Any& aIndex ) throw (uno::RuntimeExcepti if ( aIndex.hasValue() ) { uno::Reference< XCollection > xColl( xSheets, uno::UNO_QUERY_THROW ); - return xColl->Item( aIndex, uno::Any() ); + return xColl->Item( aIndex, uno::Any() ); } - return uno::makeAny( xSheets ); + return uno::makeAny( xSheets ); } -void SAL_CALL +void SAL_CALL ScVbaWindow::ScrollWorkbookTabs( const uno::Any& /*Sheets*/, const uno::Any& /*Position*/ ) throw (uno::RuntimeException) { // #TODO #FIXME need some implementation to scroll through the tabs @@ -273,7 +273,7 @@ ScVbaWindow::ScrollWorkbookTabs( const uno::Any& /*Sheets*/, const uno::Any& /*P /* sal_Int32 nSheets = 0; sal_Int32 nPosition = 0; - throw uno::RuntimeException( rtl::OUString::createFromAscii("No Implemented" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString::createFromAscii("No Implemented" ), uno::Reference< uno::XInterface >() ); sal_Bool bSheets = ( Sheets >>= nSheets ); sal_Bool bPosition = ( Position >>= nPosition ); if ( bSheets || bPosition ) // at least one param specified @@ -290,12 +290,12 @@ getPropsFromModel( const uno::Reference< frame::XModel >& xModel ) uno::Reference< frame::XController > xController = xModel->getCurrentController(); if ( !xController.is() ) throw uno::RuntimeException( rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM ("No controller for model") ), uno::Reference< uno::XInterface >() ); + RTL_CONSTASCII_USTRINGPARAM ("No controller for model") ), uno::Reference< uno::XInterface >() ); return uno::Reference< beans::XPropertySet >( xController->getFrame(), uno::UNO_QUERY ); } -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaWindow::getCaption() throw (uno::RuntimeException) { static rtl::OUString sCrud(RTL_CONSTASCII_USTRINGPARAM(" - OpenOffice.org Calc" ) ); @@ -303,8 +303,8 @@ ScVbaWindow::getCaption() throw (uno::RuntimeException) uno::Reference< beans::XPropertySet > xProps = getPropsFromModel( m_xModel ); rtl::OUString sTitle; - xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( SC_UNONAME_TITLE ) ) ) >>= sTitle; - sal_Int32 nCrudIndex = sTitle.indexOf( sCrud ); + xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( SC_UNONAME_TITLE ) ) ) >>= sTitle; + sal_Int32 nCrudIndex = sTitle.indexOf( sCrud ); // adjust title ( by removing crud ) // sCrud string present if ( nCrudIndex != -1 ) @@ -319,8 +319,8 @@ ScVbaWindow::getCaption() throw (uno::RuntimeException) // is like XL // if the adjusted title == workbook name, use name // if the adjusted title != workbook name but ... - // name == title + extension ( .csv, ,odt, .xls ) - // etc. then also use the name + // name == title + extension ( .csv, ,odt, .xls ) + // etc. then also use the name if ( !sTitle.equals( sName ) ) { @@ -332,40 +332,40 @@ ScVbaWindow::getCaption() throw (uno::RuntimeException) sTitle = sName; } } - } + } return uno::makeAny( sTitle ); } -void SAL_CALL +void SAL_CALL ScVbaWindow::setCaption( const uno::Any& _caption ) throw (uno::RuntimeException) { - + uno::Reference< beans::XPropertySet > xProps = getPropsFromModel( m_xModel ); xProps->setPropertyValue( rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM ( SC_UNONAME_TITLE ) ) , _caption ); + RTL_CONSTASCII_USTRINGPARAM ( SC_UNONAME_TITLE ) ) , _caption ); } -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaWindow::getScrollRow() throw (uno::RuntimeException) -{ +{ sal_Int32 nValue = 0; - ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); + ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); if ( pViewShell ) { ScSplitPos eWhich = pViewShell->GetViewData()->GetActivePart(); nValue = pViewShell->GetViewData()->GetPosY(WhichV(eWhich)); } - + return uno::makeAny( nValue + 1); } -void SAL_CALL +void SAL_CALL ScVbaWindow::setScrollRow( const uno::Any& _scrollrow ) throw (uno::RuntimeException) { - ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); + ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); if ( pViewShell ) { - sal_Int32 scrollRow = 0; + sal_Int32 scrollRow = 0; _scrollrow >>= scrollRow; ScSplitPos eWhich = pViewShell->GetViewData()->GetActivePart(); sal_Int32 nOldValue = pViewShell->GetViewData()->GetPosY(WhichV(eWhich)) + 1; @@ -373,27 +373,27 @@ ScVbaWindow::setScrollRow( const uno::Any& _scrollrow ) throw (uno::RuntimeExcep } } -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaWindow::getScrollColumn() throw (uno::RuntimeException) -{ +{ sal_Int32 nValue = 0; - ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); + ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); if ( pViewShell ) { ScSplitPos eWhich = pViewShell->GetViewData()->GetActivePart(); nValue = pViewShell->GetViewData()->GetPosX(WhichH(eWhich)); } - + return uno::makeAny( nValue + 1); } -void SAL_CALL +void SAL_CALL ScVbaWindow::setScrollColumn( const uno::Any& _scrollcolumn ) throw (uno::RuntimeException) { - ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); + ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); if ( pViewShell ) { - sal_Int32 scrollColumn = 0; + sal_Int32 scrollColumn = 0; _scrollcolumn >>= scrollColumn; ScSplitPos eWhich = pViewShell->GetViewData()->GetActivePart(); sal_Int32 nOldValue = pViewShell->GetViewData()->GetPosX(WhichH(eWhich)) + 1; @@ -401,11 +401,11 @@ ScVbaWindow::setScrollColumn( const uno::Any& _scrollcolumn ) throw (uno::Runtim } } -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaWindow::getWindowState() throw (uno::RuntimeException) -{ +{ sal_Int32 nwindowState = xlNormal; - ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); + ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); SfxViewFrame* pViewFrame = pViewShell -> GetViewFrame(); WorkWindow* pWork = (WorkWindow*) pViewFrame->GetFrame().GetSystemWindow(); if ( pWork ) @@ -418,12 +418,12 @@ ScVbaWindow::getWindowState() throw (uno::RuntimeException) return uno::makeAny( nwindowState ); } -void SAL_CALL +void SAL_CALL ScVbaWindow::setWindowState( const uno::Any& _windowstate ) throw (uno::RuntimeException) { sal_Int32 nwindowState = xlMaximized; _windowstate >>= nwindowState; - ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); + ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); SfxViewFrame* pViewFrame = pViewShell -> GetViewFrame(); WorkWindow* pWork = (WorkWindow*) pViewFrame->GetFrame().GetSystemWindow(); if ( pWork ) @@ -455,19 +455,19 @@ ScVbaWindow::Close( const uno::Any& SaveChanges, const uno::Any& FileName, const } uno::Reference< excel::XPane > SAL_CALL -ScVbaWindow::ActivePane() throw (script::BasicErrorException, uno::RuntimeException) -{ +ScVbaWindow::ActivePane() throw (script::BasicErrorException, uno::RuntimeException) +{ return new ScVbaPane( this, mxContext, m_xModel, m_xViewPane ); } -uno::Reference< excel::XRange > SAL_CALL +uno::Reference< excel::XRange > SAL_CALL ScVbaWindow::ActiveCell( ) throw (script::BasicErrorException, uno::RuntimeException) { uno::Reference< excel::XApplication > xApplication( Application(), uno::UNO_QUERY_THROW ); return xApplication->getActiveCell(); } -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaWindow::Selection( ) throw (script::BasicErrorException, uno::RuntimeException) { uno::Reference< excel::XApplication > xApplication( Application(), uno::UNO_QUERY_THROW ); @@ -489,11 +489,11 @@ ScVbaWindow::getDisplayGridlines() throw (uno::RuntimeException) rtl::OUString sName( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_SHOWGRID ) ); sal_Bool bGrid = sal_True; xProps->getPropertyValue( sName ) >>= bGrid; - return bGrid; + return bGrid; } -void SAL_CALL +void SAL_CALL ScVbaWindow::setDisplayGridlines( ::sal_Bool _displaygridlines ) throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW ); @@ -501,17 +501,17 @@ ScVbaWindow::setDisplayGridlines( ::sal_Bool _displaygridlines ) throw (uno::Run xProps->setPropertyValue( sName, uno::makeAny( _displaygridlines )); } -::sal_Bool SAL_CALL +::sal_Bool SAL_CALL ScVbaWindow::getDisplayHeadings() throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW ); rtl::OUString sName( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_COLROWHDR ) ); sal_Bool bHeading = sal_True; xProps->getPropertyValue( sName ) >>= bHeading; - return bHeading; + return bHeading; } -void SAL_CALL +void SAL_CALL ScVbaWindow::setDisplayHeadings( ::sal_Bool _bDisplayHeadings ) throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW ); @@ -519,17 +519,17 @@ ScVbaWindow::setDisplayHeadings( ::sal_Bool _bDisplayHeadings ) throw (uno::Runt xProps->setPropertyValue( sName, uno::makeAny( _bDisplayHeadings )); } -::sal_Bool SAL_CALL +::sal_Bool SAL_CALL ScVbaWindow::getDisplayHorizontalScrollBar() throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW ); rtl::OUString sName( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_HORSCROLL ) ); sal_Bool bHorizontalScrollBar = sal_True; xProps->getPropertyValue( sName ) >>= bHorizontalScrollBar; - return bHorizontalScrollBar; + return bHorizontalScrollBar; } -void SAL_CALL +void SAL_CALL ScVbaWindow::setDisplayHorizontalScrollBar( ::sal_Bool _bDisplayHorizontalScrollBar ) throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW ); @@ -537,17 +537,17 @@ ScVbaWindow::setDisplayHorizontalScrollBar( ::sal_Bool _bDisplayHorizontalScroll xProps->setPropertyValue( sName, uno::makeAny( _bDisplayHorizontalScrollBar )); } -::sal_Bool SAL_CALL +::sal_Bool SAL_CALL ScVbaWindow::getDisplayOutline() throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW ); rtl::OUString sName( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_OUTLSYMB ) ); sal_Bool bOutline = sal_True; xProps->getPropertyValue( sName ) >>= bOutline; - return bOutline; + return bOutline; } -void SAL_CALL +void SAL_CALL ScVbaWindow::setDisplayOutline( ::sal_Bool _bDisplayOutline ) throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW ); @@ -555,17 +555,17 @@ ScVbaWindow::setDisplayOutline( ::sal_Bool _bDisplayOutline ) throw (uno::Runtim xProps->setPropertyValue( sName, uno::makeAny( _bDisplayOutline )); } -::sal_Bool SAL_CALL +::sal_Bool SAL_CALL ScVbaWindow::getDisplayVerticalScrollBar() throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW ); rtl::OUString sName( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_VERTSCROLL ) ); sal_Bool bVerticalScrollBar = sal_True; xProps->getPropertyValue( sName ) >>= bVerticalScrollBar; - return bVerticalScrollBar; + return bVerticalScrollBar; } -void SAL_CALL +void SAL_CALL ScVbaWindow::setDisplayVerticalScrollBar( ::sal_Bool _bDisplayVerticalScrollBar ) throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW ); @@ -573,17 +573,17 @@ ScVbaWindow::setDisplayVerticalScrollBar( ::sal_Bool _bDisplayVerticalScrollBar xProps->setPropertyValue( sName, uno::makeAny( _bDisplayVerticalScrollBar )); } -::sal_Bool SAL_CALL +::sal_Bool SAL_CALL ScVbaWindow::getDisplayWorkbookTabs() throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW ); rtl::OUString sName( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_SHEETTABS ) ); sal_Bool bWorkbookTabs = sal_True; xProps->getPropertyValue( sName ) >>= bWorkbookTabs; - return bWorkbookTabs; + return bWorkbookTabs; } -void SAL_CALL +void SAL_CALL ScVbaWindow::setDisplayWorkbookTabs( ::sal_Bool _bDisplayWorkbookTabs ) throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW ); @@ -591,13 +591,13 @@ ScVbaWindow::setDisplayWorkbookTabs( ::sal_Bool _bDisplayWorkbookTabs ) throw (u xProps->setPropertyValue( sName, uno::makeAny( _bDisplayWorkbookTabs )); } -::sal_Bool SAL_CALL +::sal_Bool SAL_CALL ScVbaWindow::getFreezePanes() throw (uno::RuntimeException) { - return m_xViewFreezable->hasFrozenPanes(); + return m_xViewFreezable->hasFrozenPanes(); } -void SAL_CALL +void SAL_CALL ScVbaWindow::setFreezePanes( ::sal_Bool /*_bFreezePanes*/ ) throw (uno::RuntimeException) { if( m_xViewSplitable->getIsWindowSplit() ) @@ -609,21 +609,21 @@ ScVbaWindow::setFreezePanes( ::sal_Bool /*_bFreezePanes*/ ) throw (uno::RuntimeE } else { - // otherwise we freeze in the center of the visible sheet + // otherwise we freeze in the center of the visible sheet table::CellRangeAddress aCellRangeAddress = m_xViewPane->getVisibleRange(); sal_Int32 nColumn = aCellRangeAddress.StartColumn + (( aCellRangeAddress.EndColumn - aCellRangeAddress.StartColumn )/2 ); sal_Int32 nRow = aCellRangeAddress.StartRow + (( aCellRangeAddress.EndRow - aCellRangeAddress.StartRow )/2 ); - m_xViewFreezable->freezeAtPosition( nColumn, nRow ); + m_xViewFreezable->freezeAtPosition( nColumn, nRow ); } } -::sal_Bool SAL_CALL +::sal_Bool SAL_CALL ScVbaWindow::getSplit() throw (uno::RuntimeException) { - return m_xViewSplitable->getIsWindowSplit(); + return m_xViewSplitable->getIsWindowSplit(); } -void SAL_CALL +void SAL_CALL ScVbaWindow::setSplit( ::sal_Bool _bSplit ) throw (uno::RuntimeException) { if( !_bSplit ) @@ -640,13 +640,13 @@ ScVbaWindow::setSplit( ::sal_Bool _bSplit ) throw (uno::RuntimeException) } } -sal_Int32 SAL_CALL +sal_Int32 SAL_CALL ScVbaWindow::getSplitColumn() throw (uno::RuntimeException) { - return m_xViewSplitable->getSplitColumn(); + return m_xViewSplitable->getSplitColumn(); } -void SAL_CALL +void SAL_CALL ScVbaWindow::setSplitColumn( sal_Int32 _splitcolumn ) throw (uno::RuntimeException) { if( getSplitColumn() != _splitcolumn ) @@ -658,7 +658,7 @@ ScVbaWindow::setSplitColumn( sal_Int32 _splitcolumn ) throw (uno::RuntimeExcepti } } -double SAL_CALL +double SAL_CALL ScVbaWindow::getSplitHorizontal() throw (uno::RuntimeException) { double fSplitHorizontal = m_xViewSplitable->getSplitHorizontal(); @@ -666,21 +666,21 @@ ScVbaWindow::getSplitHorizontal() throw (uno::RuntimeException) return fHoriPoints; } -void SAL_CALL +void SAL_CALL ScVbaWindow::setSplitHorizontal( double _splithorizontal ) throw (uno::RuntimeException) { double fHoriPixels = PointsToPixels( m_xDevice, _splithorizontal, sal_True ); - m_xViewSplitable->splitAtPosition( static_cast<sal_Int32>( fHoriPixels ), 0 ); + m_xViewSplitable->splitAtPosition( static_cast<sal_Int32>( fHoriPixels ), 0 ); } -sal_Int32 SAL_CALL +sal_Int32 SAL_CALL ScVbaWindow::getSplitRow() throw (uno::RuntimeException) { sal_Int32 nValue = m_xViewSplitable->getSplitRow(); - return nValue ? nValue - 1 : nValue; + return nValue ? nValue - 1 : nValue; } -void SAL_CALL +void SAL_CALL ScVbaWindow::setSplitRow( sal_Int32 _splitrow ) throw (uno::RuntimeException) { if( getSplitRow() != _splitrow ) @@ -692,15 +692,15 @@ ScVbaWindow::setSplitRow( sal_Int32 _splitrow ) throw (uno::RuntimeException) } } -double SAL_CALL +double SAL_CALL ScVbaWindow::getSplitVertical() throw (uno::RuntimeException) { double fSplitVertical = m_xViewSplitable->getSplitVertical(); - double fVertiPoints = PixelsToPoints( m_xDevice, fSplitVertical, sal_False ); + double fVertiPoints = PixelsToPoints( m_xDevice, fSplitVertical, sal_False ); return fVertiPoints; } -void SAL_CALL +void SAL_CALL ScVbaWindow::setSplitVertical(double _splitvertical ) throw (uno::RuntimeException) { double fVertiPixels = PointsToPixels( m_xDevice, _splitvertical, sal_False ); @@ -718,9 +718,9 @@ void ScVbaWindow::SplitAtDefinedPosition(sal_Bool _bUnFreezePane) m_xViewSplitable->splitAtPosition(nHoriSplit, nVertSplit); } -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaWindow::getZoom() throw (uno::RuntimeException) -{ +{ uno::Reference< beans::XPropertySet > xProps( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW ); rtl::OUString sName( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_ZOOMTYPE ) ); sal_Int16 nZoomType = view::DocumentZoomType::PAGE_WIDTH; @@ -739,7 +739,7 @@ ScVbaWindow::getZoom() throw (uno::RuntimeException) return uno::Any(); } -void SAL_CALL +void SAL_CALL ScVbaWindow::setZoom( const uno::Any& _zoom ) throw (uno::RuntimeException) { sal_Int16 nZoom = 100; @@ -754,7 +754,7 @@ ScVbaWindow::setZoom( const uno::Any& _zoom ) throw (uno::RuntimeException) excel::implSetZoom( m_xModel, nZoom, vTabs ); } -uno::Reference< excel::XWorksheet > SAL_CALL +uno::Reference< excel::XWorksheet > SAL_CALL ScVbaWindow::ActiveSheet( ) throw (script::BasicErrorException, uno::RuntimeException) { uno::Reference< excel::XApplication > xApplication( Application(), uno::UNO_QUERY_THROW ); @@ -764,9 +764,9 @@ ScVbaWindow::ActiveSheet( ) throw (script::BasicErrorException, uno::RuntimeExc uno::Any SAL_CALL ScVbaWindow::getView() throw (uno::RuntimeException) { - // not supported now - sal_Int32 nWindowView = excel::XlWindowView::xlNormalView; - return uno::makeAny( nWindowView ); + // not supported now + sal_Int32 nWindowView = excel::XlWindowView::xlNormalView; + return uno::makeAny( nWindowView ); } void SAL_CALL @@ -808,7 +808,7 @@ ScVbaWindow::PointsToScreenPixelsX(sal_Int32 _points) throw (css::script::BasicE return static_cast<sal_Int32>(fConvertFactor * nHundredthsofOneMillimeters ); } -sal_Int32 SAL_CALL +sal_Int32 SAL_CALL ScVbaWindow::PointsToScreenPixelsY(sal_Int32 _points) throw (css::script::BasicErrorException, css::uno::RuntimeException) { sal_Int32 nHundredthsofOneMillimeters = Millimeter::getInHundredthsOfOneMillimeter( _points ); @@ -816,28 +816,28 @@ ScVbaWindow::PointsToScreenPixelsY(sal_Int32 _points) throw (css::script::BasicE return static_cast<sal_Int32>(fConvertFactor * nHundredthsofOneMillimeters ); } -void SAL_CALL +void SAL_CALL ScVbaWindow::PrintOut( const css::uno::Any& From, const css::uno::Any&To, const css::uno::Any& Copies, const css::uno::Any& Preview, const css::uno::Any& ActivePrinter, const css::uno::Any& PrintToFile, const css::uno::Any& Collate, const css::uno::Any& PrToFileName ) throw (css::script::BasicErrorException, css::uno::RuntimeException) { - // need test, print current active sheet + // need test, print current active sheet PrintOutHelper( excel::getBestViewShell( m_xModel ), From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName, sal_True ); } -void SAL_CALL +void SAL_CALL ScVbaWindow::PrintPreview( const css::uno::Any& EnableChanges ) throw (css::script::BasicErrorException, css::uno::RuntimeException) { - // need test, print preview current active sheet - PrintPreviewHelper( EnableChanges, excel::getBestViewShell( m_xModel ) ); + // need test, print preview current active sheet + PrintPreviewHelper( EnableChanges, excel::getBestViewShell( m_xModel ) ); } -rtl::OUString& +rtl::OUString& ScVbaWindow::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaWindow") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > ScVbaWindow::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sc/source/ui/vba/vbawindow.hxx b/sc/source/ui/vba/vbawindow.hxx index b21e5a42b9c1..7daf0ba54c63 100644 --- a/sc/source/ui/vba/vbawindow.hxx +++ b/sc/source/ui/vba/vbawindow.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -45,8 +45,8 @@ typedef cppu::ImplInheritanceHelper1< VbaWindowBase, ov::excel::XWindow > WindowImpl_BASE; class ScVbaWindow : public WindowImpl_BASE -{ -private: +{ +private: css::uno::Reference< css::sheet::XViewPane > m_xViewPane; css::uno::Reference< css::sheet::XViewFreezable > m_xViewFreezable; css::uno::Reference< css::sheet::XViewSplitable > m_xViewSplitable; @@ -55,16 +55,16 @@ private: void init(); protected: void SplitAtDefinedPosition(sal_Bool _bUnFreezePane); -public: - void Scroll( const css::uno::Any& Down, const css::uno::Any& Up, const css::uno::Any& ToRight, const css::uno::Any& ToLeft, bool bLargeScroll = false ) throw (css::uno::RuntimeException); +public: + void Scroll( const css::uno::Any& Down, const css::uno::Any& Up, const css::uno::Any& ToRight, const css::uno::Any& ToLeft, bool bLargeScroll = false ) throw (css::uno::RuntimeException); public: ScVbaWindow( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::frame::XModel >& xModel ); ScVbaWindow( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext > const& xContext ); // XWindow - virtual css::uno::Reference< ov::excel::XRange > SAL_CALL ActiveCell( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); + virtual css::uno::Reference< ov::excel::XRange > SAL_CALL ActiveCell( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); virtual css::uno::Reference< ov::excel::XPane > SAL_CALL ActivePane() throw (css::script::BasicErrorException, css::uno::RuntimeException); - virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL ActiveSheet( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); + virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL ActiveSheet( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); virtual void SAL_CALL setCaption( const css::uno::Any& _caption ) throw (css::uno::RuntimeException); virtual css::uno::Any SAL_CALL getCaption() throw (css::uno::RuntimeException); virtual ::sal_Bool SAL_CALL getDisplayGridlines() throw (css::uno::RuntimeException); @@ -106,7 +106,7 @@ public: // Methods virtual void SAL_CALL SmallScroll( const css::uno::Any& Down, const css::uno::Any& Up, const css::uno::Any& ToRight, const css::uno::Any& ToLeft ) throw (css::uno::RuntimeException); virtual void SAL_CALL LargeScroll( const css::uno::Any& Down, const css::uno::Any& Up, const css::uno::Any& ToRight, const css::uno::Any& ToLeft ) throw (css::uno::RuntimeException); - virtual css::uno::Any SAL_CALL SelectedSheets( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException); + virtual css::uno::Any SAL_CALL SelectedSheets( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException); virtual void SAL_CALL ScrollWorkbookTabs( const css::uno::Any& Sheets, const css::uno::Any& Position ) throw (css::uno::RuntimeException); virtual void SAL_CALL Activate( ) throw (css::uno::RuntimeException); virtual void SAL_CALL Close( const css::uno::Any& SaveChanges, const css::uno::Any& FileName, const css::uno::Any& RouteWorkBook ) throw (css::uno::RuntimeException); diff --git a/sc/source/ui/vba/vbawindows.cxx b/sc/source/ui/vba/vbawindows.cxx index f7a3e6acb589..1456c71af12c 100644 --- a/sc/source/ui/vba/vbawindows.cxx +++ b/sc/source/ui/vba/vbawindows.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -195,11 +195,11 @@ public: NameIndexHash::const_iterator it_end = namesToIndices.end(); for ( ; it != it_end; ++it, ++pString ) *pString = it->first; - return names; + return names; } - virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (uno::RuntimeException) - { + virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (uno::RuntimeException) + { NameIndexHash::const_iterator it = namesToIndices.find( aName ); return (it != namesToIndices.end()); } @@ -207,7 +207,7 @@ public: }; -ScVbaWindows::ScVbaWindows( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess ): ScVbaWindows_BASE( xParent, xContext, xIndexAccess ) +ScVbaWindows::ScVbaWindows( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess ): ScVbaWindows_BASE( xParent, xContext, xIndexAccess ) { } @@ -226,28 +226,28 @@ ScVbaWindows::createCollectionObject( const css::uno::Any& aSource ) return ComponentToWindow( aSource, mxContext, Application() ); } -uno::Type +uno::Type ScVbaWindows::getElementType() throw (uno::RuntimeException) { return excel::XWindows::static_type(0); } -void SAL_CALL +void SAL_CALL ScVbaWindows::Arrange( ::sal_Int32 /*ArrangeStyle*/, const uno::Any& /*ActiveWorkbook*/, const uno::Any& /*SyncHorizontal*/, const uno::Any& /*SyncVertical*/ ) throw (uno::RuntimeException) { //#TODO #FIXME see what can be done for an implementation here } -rtl::OUString& +rtl::OUString& ScVbaWindows::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaWindows") ); return sImplName; } -css::uno::Sequence<rtl::OUString> +css::uno::Sequence<rtl::OUString> ScVbaWindows::getServiceNames() { static uno::Sequence< rtl::OUString > sNames; diff --git a/sc/source/ui/vba/vbawindows.hxx b/sc/source/ui/vba/vbawindows.hxx index 9b1ac796503a..71d5f7cd59cb 100644 --- a/sc/source/ui/vba/vbawindows.hxx +++ b/sc/source/ui/vba/vbawindows.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -32,7 +32,7 @@ #include <ooo/vba/excel/XWindows.hpp> #include <com/sun/star/uno/XComponentContext.hpp> - + #include "excelvbahelper.hxx" #include <vbahelper/vbacollectionimpl.hxx> @@ -53,8 +53,8 @@ public: // XWindows virtual void SAL_CALL Arrange( ::sal_Int32 ArrangeStyle, const css::uno::Any& ActiveWorkbook, const css::uno::Any& SyncHorizontal, const css::uno::Any& SyncVertical ) throw (::com::sun::star::uno::RuntimeException); - // ScVbaCollectionBaseImpl - virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); + // ScVbaCollectionBaseImpl + virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); // XHelperInterface virtual rtl::OUString& getServiceImplName(); diff --git a/sc/source/ui/vba/vbaworkbook.cxx b/sc/source/ui/vba/vbaworkbook.cxx index 3e9fa27443cb..1af4fee63ef3 100644 --- a/sc/source/ui/vba/vbaworkbook.cxx +++ b/sc/source/ui/vba/vbaworkbook.cxx @@ -211,7 +211,7 @@ ScVbaWorkbook::init() if ( !ColorData.getLength() ) ResetColors(); } -ScVbaWorkbook::ScVbaWorkbook( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext) :ScVbaWorkbook_BASE( xParent, xContext ) +ScVbaWorkbook::ScVbaWorkbook( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext) :ScVbaWorkbook_BASE( xParent, xContext ) { //#FIXME this persists the color data per office instance and // not per workbook instance, need to hook the data into XModel @@ -222,7 +222,7 @@ ScVbaWorkbook::ScVbaWorkbook( const css::uno::Reference< ov::XHelperInterface init(); } -ScVbaWorkbook::ScVbaWorkbook( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::frame::XModel > xModel ) : ScVbaWorkbook_BASE( xParent, xContext, xModel ) +ScVbaWorkbook::ScVbaWorkbook( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::frame::XModel > xModel ) : ScVbaWorkbook_BASE( xParent, xContext, xModel ) { init(); } diff --git a/sc/source/ui/vba/vbaworkbook.hxx b/sc/source/ui/vba/vbaworkbook.hxx index 3f52e2683f3f..6bde08a111ae 100644 --- a/sc/source/ui/vba/vbaworkbook.hxx +++ b/sc/source/ui/vba/vbaworkbook.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -46,11 +46,11 @@ class ScVbaWorkbook : public ScVbaWorkbook_BASE ::rtl::OUString convertFileFormat(sal_Int32 aFileFormat); protected: - ScVbaWorkbook( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext); + ScVbaWorkbook( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext); public: - ScVbaWorkbook( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, + ScVbaWorkbook( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::frame::XModel > xModel ); - ScVbaWorkbook( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext ); + ScVbaWorkbook( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext ); virtual ~ScVbaWorkbook() {} // Attributes diff --git a/sc/source/ui/vba/vbaworkbooks.cxx b/sc/source/ui/vba/vbaworkbooks.cxx index 67de260af9aa..2d64f50764ba 100644 --- a/sc/source/ui/vba/vbaworkbooks.cxx +++ b/sc/source/ui/vba/vbaworkbooks.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -83,12 +83,12 @@ void setUpDocumentModules( const uno::Reference< sheet::XSpreadsheetDocument >& if( xLibContainer.is() ) { if( !xLibContainer->hasByName( aPrjName ) ) - xLibContainer->createLibrary( aPrjName ); + xLibContainer->createLibrary( aPrjName ); uno::Any aLibAny = xLibContainer->getByName( aPrjName ); uno::Reference< container::XNameContainer > xLib; aLibAny >>= xLib; if( xLib.is() ) - { + { uno::Reference< script::vba::XVBAModuleInfo > xVBAModuleInfo( xLib, uno::UNO_QUERY_THROW ); uno::Reference< lang::XMultiServiceFactory> xSF( pShell->GetModel(), uno::UNO_QUERY_THROW); // bootstrap vbaglobals @@ -120,7 +120,7 @@ void setUpDocumentModules( const uno::Reference< sheet::XSpreadsheetDocument >& for ( std::vector<rtl::OUString>::iterator it = sDocModuleNames.begin(); it != it_end; ++it ) { script::ModuleInfo sModuleInfo; - + sModuleInfo.ModuleObject.set( xVBACodeNamedObjectAccess->getByName( *it ), uno::UNO_QUERY ); sModuleInfo.ModuleType = script::ModuleType::DOCUMENT; xVBAModuleInfo->insertModuleInfo( *it, sModuleInfo ); @@ -130,7 +130,7 @@ void setUpDocumentModules( const uno::Reference< sheet::XSpreadsheetDocument >& xLib->insertByName( *it, uno::makeAny( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Option VBASupport 1\n" ) ) ) ); } } - } + } } } @@ -141,7 +141,7 @@ getWorkbook( uno::Reference< uno::XComponentContext >& xContext, const uno::Refe uno::Reference< frame::XModel > xModel( xDoc, uno::UNO_QUERY ); if( !xModel.is() ) return uno::Any(); - + ScDocShell* pShell = excel::getDocShell( xModel ); if ( pShell ) { @@ -164,8 +164,8 @@ class WorkBookEnumImpl : public EnumerationHelperImpl public: WorkBookEnumImpl( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Any& aApplication ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), m_aApplication( aApplication ) {} - virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) - { + virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) + { uno::Reference< sheet::XSpreadsheetDocument > xDoc( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW ); return getWorkbook( m_xContext, xDoc, m_xParent ); } @@ -185,7 +185,7 @@ uno::Reference< container::XEnumeration > ScVbaWorkbooks::createEnumeration() throw (uno::RuntimeException) { // #FIXME its possible the WorkBookEnumImpl here doens't reflect - // the state of this object ( although it should ) would be + // the state of this object ( although it should ) would be // safer to create an enumeration based on this objects state // rather than one effectively based of the desktop component uno::Reference< container::XEnumerationAccess > xEnumerationAccess( m_xIndexAccess, uno::UNO_QUERY_THROW ); @@ -205,7 +205,7 @@ ScVbaWorkbooks::Add() throw (uno::RuntimeException) { uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( VbaDocumentsBase::Add() , uno::UNO_QUERY_THROW ); - // need to set up the document modules ( and vba mode ) here + // need to set up the document modules ( and vba mode ) here setUpDocumentModules( xSpreadDoc ); if( xSpreadDoc.is() ) return getWorkbook( mxContext, xSpreadDoc, mxParent ); @@ -218,13 +218,13 @@ ScVbaWorkbooks::Close() throw (uno::RuntimeException) VbaDocumentsBase::Close(); } -bool +bool ScVbaWorkbooks::isTextFile( const rtl::OUString& sType ) { // will return true if the file is // a) a variant of a text file // b) a csv file - // c) unknown + // c) unknown // returning true basically means treat this like a csv file const static rtl::OUString txtType( RTL_CONSTASCII_USTRINGPARAM("writer_Text" ) ); const static rtl::OUString csvType( RTL_CONSTASCII_USTRINGPARAM("calc_Text_txt_csv_StarCalc" ) ); @@ -232,18 +232,18 @@ ScVbaWorkbooks::isTextFile( const rtl::OUString& sType ) return sType.equals( txtType ) || sType.equals( csvType ) || ( sType.getLength() == 0 ) || sType.equals( encodedTxtType ); } -bool +bool ScVbaWorkbooks::isSpreadSheetFile( const rtl::OUString& sType ) { // include calc_QPro etc. ? ( not for the moment anyway ) - if ( sType.indexOf( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("calc_MS"))) == 0 - || sType.indexOf( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("calc8"))) == 0 + if ( sType.indexOf( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("calc_MS"))) == 0 + || sType.indexOf( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("calc8"))) == 0 || sType.indexOf( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("calc_StarOffice"))) == 0 ) return true; return false; } -rtl::OUString +rtl::OUString ScVbaWorkbooks::getFileFilterType( const rtl::OUString& rFileName ) { uno::Reference< document::XTypeDetection > xTypeDetect( mxContext->getServiceManager()->createInstanceWithContext(::rtl::OUString::createFromAscii("com.sun.star.document.TypeDetection"), mxContext), uno::UNO_QUERY_THROW ); @@ -270,10 +270,10 @@ ScVbaWorkbooks::Open( const rtl::OUString& rFileName, const uno::Any& /*UpdateLi uno::Sequence< beans::PropertyValue > sProps(0); sal_Int32 nIndex = 0; - + rtl::OUString sType = getFileFilterType( aURL ); - // A text file means it needs to be processed as a csv file - if ( isTextFile( sType ) ) + // A text file means it needs to be processed as a csv file + if ( isTextFile( sType ) ) { // Values for format // 1 Tabs @@ -285,24 +285,24 @@ ScVbaWorkbooks::Open( const rtl::OUString& rFileName, const uno::Any& /*UpdateLi // no format means use the current delimiter sProps.realloc( 3 ); sProps[ nIndex ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FilterOptions" ) ); - sal_Int16 delims[] = { 0 /*default not used*/, 9/*tab*/, 44/*comma*/, 32/*space*/, 59/*semicolon*/ }; + sal_Int16 delims[] = { 0 /*default not used*/, 9/*tab*/, 44/*comma*/, 32/*space*/, 59/*semicolon*/ }; static rtl::OUString sRestOfFormat( RTL_CONSTASCII_USTRINGPARAM(",34,0,1" ) ); - + rtl::OUString sFormat; sal_Int16 nFormat = 0; // default indicator if ( Format.hasValue() ) { - Format >>= nFormat; // val of nFormat overwritten if extracted - // validate param + Format >>= nFormat; // val of nFormat overwritten if extracted + // validate param if ( nFormat < 1 || nFormat > 6 ) throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Illegal value for Format" ) ), uno::Reference< uno::XInterface >() ); } sal_Int16 nDelim = getCurrentDelim(); - if ( nFormat > 0 && nFormat < CUSTOM_CHAR ) + if ( nFormat > 0 && nFormat < CUSTOM_CHAR ) { nDelim = delims[ nFormat ]; } @@ -333,7 +333,7 @@ ScVbaWorkbooks::Open( const rtl::OUString& rFileName, const uno::Any& /*UpdateLi } else if ( !isSpreadSheetFile( sType ) ) throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Bad Format")), uno::Reference< uno::XInterface >() ); - + uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( VbaDocumentsBase::Open( rFileName, ReadOnly, sProps ), uno::UNO_QUERY_THROW ); uno::Any aRet = getWorkbook( mxContext, xSpreadDoc, mxParent ); uno::Reference< excel::XWorkbook > xWBook( aRet, uno::UNO_QUERY ); @@ -348,14 +348,14 @@ ScVbaWorkbooks::Open( const rtl::OUString& Filename, const uno::Any& ReadOnly, c return VbaDocumentsBase::Open( Filename, ReadOnly, rProps ); } -rtl::OUString& +rtl::OUString& ScVbaWorkbooks::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaWorkbooks") ); return sImplName; } -css::uno::Sequence<rtl::OUString> +css::uno::Sequence<rtl::OUString> ScVbaWorkbooks::getServiceNames() { static uno::Sequence< rtl::OUString > sNames; diff --git a/sc/source/ui/vba/vbaworkbooks.hxx b/sc/source/ui/vba/vbaworkbooks.hxx index a195bb8d3cd0..6cd6d90fc46b 100644 --- a/sc/source/ui/vba/vbaworkbooks.hxx +++ b/sc/source/ui/vba/vbaworkbooks.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -43,9 +43,9 @@ typedef cppu::ImplInheritanceHelper1< VbaDocumentsBase, ov::excel::XWorkbooks > class ScVbaWorkbooks : public ScVbaWorkbooks_BASE { private: - rtl::OUString getFileFilterType( const rtl::OUString& rString ); - bool isTextFile( const rtl::OUString& rString ); - bool isSpreadSheetFile( const rtl::OUString& rString ); + rtl::OUString getFileFilterType( const rtl::OUString& rString ); + bool isTextFile( const rtl::OUString& rString ); + bool isSpreadSheetFile( const rtl::OUString& rString ); static sal_Int16& getCurrentDelim(){ static sal_Int16 nDelim = 44; return nDelim; } public: ScVbaWorkbooks( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext ); @@ -56,7 +56,7 @@ public: virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException); // ScVbaWorkbooks_BASE - virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); + virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); virtual rtl::OUString& getServiceImplName(); virtual css::uno::Sequence<rtl::OUString> getServiceNames(); diff --git a/sc/source/ui/vba/vbaworksheet.hxx b/sc/source/ui/vba/vbaworksheet.hxx index abcdf60398af..b27bf99fd40a 100644 --- a/sc/source/ui/vba/vbaworksheet.hxx +++ b/sc/source/ui/vba/vbaworksheet.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -70,16 +70,16 @@ class ScVbaWorksheet : public WorksheetImpl_BASE css::uno::Reference< css::container::XNameAccess > getFormControls(); css::uno::Any getControlShape( const rtl::OUString& sName ); - + css::uno::Reference< css::beans::XPropertySet > getFirstDBRangeProperties() throw (css::uno::RuntimeException); - + protected: ScVbaWorksheet( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext ); public: ScVbaWorksheet( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, - const css::uno::Reference< css::sheet::XSpreadsheet >& xSheet, + const css::uno::Reference< css::sheet::XSpreadsheet >& xSheet, const css::uno::Reference< css::frame::XModel >& xModel )throw (css::uno::RuntimeException) ; ScVbaWorksheet( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext ) throw ( css::lang::IllegalArgumentException ); @@ -133,7 +133,7 @@ public: virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Rows(const css::uno::Any& aIndex ) throw (css::uno::RuntimeException); virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Columns(const css::uno::Any& aIndex ) throw (css::uno::RuntimeException); - virtual css::uno::Any SAL_CALL Evaluate( const ::rtl::OUString& Name ) throw (css::uno::RuntimeException); + virtual css::uno::Any SAL_CALL Evaluate( const ::rtl::OUString& Name ) throw (css::uno::RuntimeException); virtual css::uno::Any SAL_CALL PivotTables( const css::uno::Any& Index ) throw (css::uno::RuntimeException); virtual css::uno::Any SAL_CALL Comments( const css::uno::Any& Index ) throw (css::uno::RuntimeException); virtual css::uno::Any SAL_CALL Hyperlinks( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException); @@ -153,7 +153,7 @@ public: virtual css::uno::Any SAL_CALL Spinners( const css::uno::Any& rIndex ) throw (css::uno::RuntimeException); virtual void SAL_CALL setEnableCalculation( ::sal_Bool EnableCalculation ) throw ( css::script::BasicErrorException, css::uno::RuntimeException); - virtual ::sal_Bool SAL_CALL getEnableCalculation( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL getEnableCalculation( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); virtual void SAL_CALL ShowDataForm( ) throw (css::uno::RuntimeException); // XInvocation virtual css::uno::Reference< css::beans::XIntrospectionAccess > SAL_CALL getIntrospection( ) throw (css::uno::RuntimeException); @@ -169,7 +169,7 @@ public: virtual void SAL_CALL PrintOut( const css::uno::Any& From, const css::uno::Any& To, const css::uno::Any& Copies, const css::uno::Any& Preview, const css::uno::Any& ActivePrinter, const css::uno::Any& PrintToFile, const css::uno::Any& Collate, const css::uno::Any& PrToFileName, const css::uno::Any& IgnorePrintAreas ) throw (css::uno::RuntimeException); // XHelperInterface virtual rtl::OUString& getServiceImplName(); - virtual css::uno::Sequence<rtl::OUString> getServiceNames(); + virtual css::uno::Sequence<rtl::OUString> getServiceNames(); }; #endif /* SC_VBA_WORKSHEET_HXX */ diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx index cb345950958b..5263b9a8ea34 100644 --- a/sc/source/ui/vba/vbaworksheets.cxx +++ b/sc/source/ui/vba/vbaworksheets.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -61,7 +61,7 @@ using namespace ::com::sun::star; typedef ::cppu::WeakImplHelper1< container::XEnumeration > SheetEnumeration_BASE; typedef ::cppu::WeakImplHelper3< container::XNameAccess, container::XIndexAccess, container::XEnumerationAccess > SheetCollectionHelper_BASE; -// a map ( or hashmap ) wont do as we need also to preserve the order +// a map ( or hashmap ) wont do as we need also to preserve the order // (as added ) of the items typedef std::vector< uno::Reference< sheet::XSpreadsheet > > SheetMap; @@ -69,7 +69,7 @@ typedef std::vector< uno::Reference< sheet::XSpreadsheet > > SheetMap; // #FIXME #TODO the implementation of the Sheets collections sucks, // e.g. there is no support for tracking sheets added/removed from the collection -uno::Reference< uno::XInterface > +uno::Reference< uno::XInterface > lcl_getModulAsUnoObject( const uno::Reference< sheet::XSpreadsheet >& xSheet, const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException ) { uno::Reference< uno::XInterface > xRet; @@ -80,7 +80,7 @@ lcl_getModulAsUnoObject( const uno::Reference< sheet::XSpreadsheet >& xSheet, co xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_CODENAME ) ) ) >>= sName; ScDocShell* pShell = excel::getDocShell( xModel ); - + if ( pShell ) xRet = getUnoDocModule( sName, pShell ); return xRet; @@ -114,7 +114,7 @@ public: // XElementAccess virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException) { return sheet::XSpreadsheet::static_type(0); } virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException) { return ( mSheetMap.size() > 0 ); } - // XNameAcess + // XNameAcess virtual uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { if ( !hasByName(aName) ) @@ -130,7 +130,7 @@ public: for ( ; it != it_end; ++it, ++pString ) { - uno::Reference< container::XNamed > xName( *it, uno::UNO_QUERY_THROW ); + uno::Reference< container::XNamed > xName( *it, uno::UNO_QUERY_THROW ); *pString = xName->getName(); } return sNames; @@ -141,7 +141,7 @@ public: SheetMap::iterator it_end = mSheetMap.end(); for ( ; cachePos != it_end; ++cachePos ) { - uno::Reference< container::XNamed > xName( *cachePos, uno::UNO_QUERY_THROW ); + uno::Reference< container::XNamed > xName( *cachePos, uno::UNO_QUERY_THROW ); if ( aName.equals( xName->getName() ) ) break; } @@ -149,12 +149,12 @@ public: } // XElementAccess - virtual ::sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException) { return mSheetMap.size(); } + virtual ::sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException) { return mSheetMap.size(); } virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException ) { if ( Index < 0 || Index >= getCount() ) throw lang::IndexOutOfBoundsException(); - + return uno::makeAny( mSheetMap[ Index ] ); } @@ -171,35 +171,35 @@ class SheetsEnumeration : public EnumerationHelperImpl public: SheetsEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), m_xModel( xModel ) {} - virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) - { + virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) + { uno::Reference< sheet::XSpreadsheet > xSheet( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW ); uno::Reference< uno::XInterface > xIf = lcl_getModulAsUnoObject( xSheet, m_xModel ); uno::Any aRet; if ( !xIf.is() ) { - // if the Sheet is in a document created by the api unfortunately ( at the + // if the Sheet is in a document created by the api unfortunately ( at the // moment, it actually wont have the special Document modules uno::Reference< excel::XWorksheet > xNewSheet( new ScVbaWorksheet( m_xParent, m_xContext, xSheet, m_xModel ) ); - aRet <<= xNewSheet; + aRet <<= xNewSheet; } else - aRet <<= xIf; + aRet <<= xIf; return aRet; } }; -ScVbaWorksheets::ScVbaWorksheets( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< ::com::sun::star::uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xSheets, const uno::Reference< frame::XModel >& xModel ): ScVbaWorksheets_BASE( xParent, xContext, xSheets ), mxModel( xModel ), m_xSheets( uno::Reference< sheet::XSpreadsheets >( xSheets, uno::UNO_QUERY ) ) +ScVbaWorksheets::ScVbaWorksheets( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< ::com::sun::star::uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xSheets, const uno::Reference< frame::XModel >& xModel ): ScVbaWorksheets_BASE( xParent, xContext, xSheets ), mxModel( xModel ), m_xSheets( uno::Reference< sheet::XSpreadsheets >( xSheets, uno::UNO_QUERY ) ) { } -ScVbaWorksheets::ScVbaWorksheets( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< ::com::sun::star::uno::XComponentContext > & xContext, const uno::Reference< container::XEnumerationAccess >& xEnumAccess, const uno::Reference< frame::XModel >& xModel ): ScVbaWorksheets_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( xEnumAccess, uno::UNO_QUERY ) ), mxModel(xModel) +ScVbaWorksheets::ScVbaWorksheets( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< ::com::sun::star::uno::XComponentContext > & xContext, const uno::Reference< container::XEnumerationAccess >& xEnumAccess, const uno::Reference< frame::XModel >& xModel ): ScVbaWorksheets_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( xEnumAccess, uno::UNO_QUERY ) ), mxModel(xModel) { } // XEnumerationAccess -uno::Type +uno::Type ScVbaWorksheets::getElementType() throw (uno::RuntimeException) { return excel::XWorksheet::static_type(0); @@ -211,7 +211,7 @@ ScVbaWorksheets::createEnumeration() throw (uno::RuntimeException) if ( !m_xSheets.is() ) { uno::Reference< container::XEnumerationAccess > xAccess( m_xIndexAccess, uno::UNO_QUERY_THROW ); - return xAccess->createEnumeration(); + return xAccess->createEnumeration(); } uno::Reference< container::XEnumerationAccess > xEnumAccess( m_xSheets, uno::UNO_QUERY_THROW ); return new SheetsEnumeration( this, mxContext, xEnumAccess->createEnumeration(), mxModel ); @@ -225,7 +225,7 @@ ScVbaWorksheets::createCollectionObject( const uno::Any& aSource ) uno::Any aRet; if ( !xIf.is() ) { - // if the Sheet is in a document created by the api unfortunately ( at the + // if the Sheet is in a document created by the api unfortunately ( at the // moment, it actually wont have the special Document modules uno::Reference< excel::XWorksheet > xNewSheet( new ScVbaWorksheet( getParent(), mxContext, xSheet, mxModel ) ); aRet <<= xNewSheet; @@ -242,7 +242,7 @@ ScVbaWorksheets::Add( const uno::Any& Before, const uno::Any& After, { if ( isSelectedSheets() ) return uno::Any(); // or should we throw? - + rtl::OUString aStringSheet; sal_Bool bBefore(sal_True); SCTAB nSheetIndex = 0; @@ -291,7 +291,7 @@ ScVbaWorksheets::Add( const uno::Any& Before, const uno::Any& After, nSheetIndex++; SCTAB nSheetName = nCount + 1L; - String aStringBase( RTL_CONSTASCII_USTRINGPARAM("Sheet") ); + String aStringBase( RTL_CONSTASCII_USTRINGPARAM("Sheet") ); uno::Any result; for (SCTAB i=0; i < nNewSheets; i++, nSheetName++) { @@ -308,7 +308,7 @@ ScVbaWorksheets::Add( const uno::Any& Before, const uno::Any& After, } uno::Reference< excel::XWorksheet > xNewSheet( result, uno::UNO_QUERY ); if ( xNewSheet.is() ) - xNewSheet->Activate(); + xNewSheet->Activate(); return result; } @@ -333,7 +333,7 @@ ScVbaWorksheets::isSelectedSheets() return !m_xSheets.is(); } -void SAL_CALL +void SAL_CALL ScVbaWorksheets::PrintOut( const uno::Any& From, const uno::Any& To, const uno::Any& Copies, const uno::Any& Preview, const uno::Any& ActivePrinter, const uno::Any& PrintToFile, const uno::Any& Collate, const uno::Any& PrToFileName ) throw (uno::RuntimeException) { sal_Int32 nTo = 0; @@ -354,7 +354,7 @@ ScVbaWorksheets::PrintOut( const uno::Any& From, const uno::Any& To, const uno:: PrintOutHelper( excel::getBestViewShell( mxModel ), From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName, bSelection ); } -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaWorksheets::getVisible() throw (uno::RuntimeException) { sal_Bool bVisible = sal_True; @@ -371,7 +371,7 @@ ScVbaWorksheets::getVisible() throw (uno::RuntimeException) return uno::makeAny( bVisible ); } -void SAL_CALL +void SAL_CALL ScVbaWorksheets::setVisible( const uno::Any& _visible ) throw (uno::RuntimeException) { sal_Bool bState = sal_False; @@ -385,24 +385,24 @@ ScVbaWorksheets::setVisible( const uno::Any& _visible ) throw (uno::RuntimeExcep } } else - throw uno::RuntimeException( rtl::OUString( + throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Visible property doesn't support non boolean #FIXME" ) ), uno::Reference< uno::XInterface >() ); } -void SAL_CALL +void SAL_CALL ScVbaWorksheets::Select( const uno::Any& Replace ) throw (uno::RuntimeException) { ScTabViewShell* pViewShell = excel::getBestViewShell( mxModel ); if ( !pViewShell ) throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cannot obtain view shell" ) ), uno::Reference< uno::XInterface >() ); - + ScMarkData& rMarkData = pViewShell->GetViewData()->GetMarkData(); sal_Bool bReplace = sal_True; Replace >>= bReplace; - // Replace is defaulted to True, meanining this current collection + // Replace is defaulted to True, meanining this current collection // becomes the Selection, if it were false then the current selection would // be extended - bool bSelectSingle = bReplace; + bool bSelectSingle = bReplace; sal_Int32 nElems = getCount(); for ( sal_Int32 nItem = 1; nItem <= nElems; ++nItem ) { @@ -417,15 +417,15 @@ ScVbaWorksheets::Select( const uno::Any& Replace ) throw (uno::RuntimeException) } else rMarkData.SelectTable( static_cast< SCTAB >( pSheet->getSheetID() ), TRUE ); - + } } - + } //ScVbaCollectionBaseImpl -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaWorksheets::Item( const uno::Any& Index, const uno::Any& Index2 ) throw (uno::RuntimeException) { if ( Index.getValueTypeClass() == uno::TypeClass_SEQUENCE ) @@ -447,28 +447,28 @@ ScVbaWorksheets::Item( const uno::Any& Index, const uno::Any& Index2 ) throw (u uno::Reference< container::XNamed > xName( xSheet, uno::UNO_QUERY_THROW ); mSheets.push_back( xSheet ); } - } + } uno::Reference< container::XIndexAccess > xIndexAccess = new SheetCollectionHelper( mSheets ); uno::Reference< XCollection > xSelectedSheets( new ScVbaWorksheets( this->getParent(), mxContext, xIndexAccess, mxModel ) ); return uno::makeAny( xSelectedSheets ); } - return ScVbaWorksheets_BASE::Item( Index, Index2 ); + return ScVbaWorksheets_BASE::Item( Index, Index2 ); } -uno::Any +uno::Any ScVbaWorksheets::getItemByStringIndex( const rtl::OUString& sIndex ) throw (uno::RuntimeException) { return ScVbaWorksheets_BASE::getItemByStringIndex( sIndex ); } -rtl::OUString& +rtl::OUString& ScVbaWorksheets::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaWorksheets") ); return sImplName; } -css::uno::Sequence<rtl::OUString> +css::uno::Sequence<rtl::OUString> ScVbaWorksheets::getServiceNames() { static uno::Sequence< rtl::OUString > sNames; diff --git a/sc/source/ui/vba/vbaworksheets.hxx b/sc/source/ui/vba/vbaworksheets.hxx index 9854c0447c1d..82001c0d77c8 100644 --- a/sc/source/ui/vba/vbaworksheets.hxx +++ b/sc/source/ui/vba/vbaworksheets.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -35,7 +35,7 @@ #include <com/sun/star/sheet/XSpreadsheetDocument.hpp> #include <com/sun/star/container/XEnumerationAccess.hpp> #include <com/sun/star/uno/XComponentContext.hpp> - + #include <vbahelper/vbacollectionimpl.hxx> #include "address.hxx" @@ -70,7 +70,7 @@ public: virtual css::uno::Any SAL_CALL Add( const css::uno::Any& Before, const css::uno::Any& After, const css::uno::Any& Count, const css::uno::Any& Type ) throw (css::uno::RuntimeException); virtual void SAL_CALL Delete( ) throw (css::uno::RuntimeException); virtual void SAL_CALL PrintOut( const css::uno::Any& From, const css::uno::Any& To, const css::uno::Any& Copies, const css::uno::Any& Preview, const css::uno::Any& ActivePrinter, const css::uno::Any& PrintToFile, const css::uno::Any& Collate, const css::uno::Any& PrToFileName ) throw (css::uno::RuntimeException); - virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); + virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); virtual void SAL_CALL Select( const css::uno::Any& Replace ) throw (css::uno::RuntimeException); // ScVbaWorksheets_BASE virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index1, const css::uno::Any& Index2 ) throw diff --git a/sc/source/ui/vba/vbawsfunction.hxx b/sc/source/ui/vba/vbawsfunction.hxx index 2e1c768b9588..ff7c68cea6ba 100644 --- a/sc/source/ui/vba/vbawsfunction.hxx +++ b/sc/source/ui/vba/vbawsfunction.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -49,7 +49,7 @@ public: virtual css::uno::Any SAL_CALL getValue(const rtl::OUString& PropertyName) throw(css::beans::UnknownPropertyException, css::uno::RuntimeException); virtual sal_Bool SAL_CALL hasMethod(const rtl::OUString& Name) throw(css::uno::RuntimeException); virtual sal_Bool SAL_CALL hasProperty(const rtl::OUString& Name) throw(css::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getExactName( const ::rtl::OUString& aApproximateName ) throw (css::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getExactName( const ::rtl::OUString& aApproximateName ) throw (css::uno::RuntimeException); // XHelperInterface virtual rtl::OUString& getServiceImplName(); virtual css::uno::Sequence<rtl::OUString> getServiceNames(); |