diff options
Diffstat (limited to 'sc/source/ui/unoobj/docuno.cxx')
-rw-r--r-- | sc/source/ui/unoobj/docuno.cxx | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 708726555..df9281093 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -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 @@ -102,6 +102,7 @@ #include "scresid.hxx" using namespace com::sun::star; +#define SC_UNO_VBADOCOBJ "ThisVBADocObj" // perhaps we want to actually make this ThisWorkbook ? //------------------------------------------------------------------------ @@ -117,6 +118,7 @@ const SfxItemPropertyMapEntry* lcl_GetDocOptPropertyMap() {MAP_CHAR_LEN(SC_UNO_AUTOCONTFOC), 0, &getBooleanCppuType(), 0, 0}, {MAP_CHAR_LEN(SC_UNO_BASICLIBRARIES), 0, &getCppuType((uno::Reference< script::XLibraryContainer >*)0), beans::PropertyAttribute::READONLY, 0}, {MAP_CHAR_LEN(SC_UNO_DIALOGLIBRARIES), 0, &getCppuType((uno::Reference< script::XLibraryContainer >*)0), beans::PropertyAttribute::READONLY, 0}, + {MAP_CHAR_LEN(SC_UNO_VBADOCOBJ), 0, &getCppuType((beans::PropertyValue*)0), beans::PropertyAttribute::READONLY, 0}, {MAP_CHAR_LEN(SC_UNO_CALCASSHOWN), PROP_UNO_CALCASSHOWN, &getBooleanCppuType(), 0, 0}, {MAP_CHAR_LEN(SC_UNONAME_CLOCAL), 0, &getCppuType((lang::Locale*)0), 0, 0}, {MAP_CHAR_LEN(SC_UNO_CJK_CLOCAL), 0, &getCppuType((lang::Locale*)0), 0, 0}, @@ -235,7 +237,7 @@ ScPrintUIOptions::ScPrintUIOptions() SvtModuleOptions aOpt; String aAppGroupname( aStrings.GetString( 18 ) ); aAppGroupname.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ), - aOpt.GetModuleName( SvtModuleOptions::E_SCALC ) ); + aOpt.GetModuleName( SvtModuleOptions::E_SCALC ) ); m_aUIProperties[0].Value = getGroupControlOpt( aAppGroupname, rtl::OUString() ); // create subgroup for pages @@ -254,7 +256,7 @@ ScPrintUIOptions::ScPrintUIOptions() rtl::OUString(), aPrintRangeOpt ); - + // create a choice for the content to create uno::Sequence< rtl::OUString > aChoices( 3 ), aHelpTexts( 3 ); aChoices[0] = aStrings.GetString( 7 ); @@ -268,7 +270,7 @@ ScPrintUIOptions::ScPrintUIOptions() rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) ), aChoices, nContent ); - + // create Subgroup for print range aPrintRangeOpt.mbInternalOnly = sal_True; m_aUIProperties[5].Value = getSubgroupControlOpt( rtl::OUString( aStrings.GetString( 13 ) ), @@ -297,7 +299,7 @@ ScPrintUIOptions::ScPrintUIOptions() rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ), rtl::OUString(), aPageRangeOpt - ); + ); // "Print only selected sheets" isn't needed because of the "Selected Sheets" choice in "Print content" #if 0 @@ -756,7 +758,7 @@ BOOL ScModelObj::FillRenderMarkData( const uno::Any& aSelection, DBG_ASSERT( pDocShell, "FillRenderMarkData: DocShell must be set" ); BOOL bDone = FALSE; - + uno::Reference<frame::XController> xView; // defaults when no options are passed: all sheets, include empty pages @@ -1662,7 +1664,7 @@ void SAL_CALL ScModelObj::setPropertyValue( rtl::OUString sCodeName; if ( aValue >>= sCodeName ) pDoc->SetCodeName( sCodeName ); - } + } else if ( aString.EqualsAscii( SC_UNO_CJK_CLOCAL ) ) { lang::Locale aLocale; @@ -1791,7 +1793,7 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const rtl::OUString& aPropertyNa { rtl::OUString sCodeName = pDoc->GetCodeName(); aRet <<= sCodeName; - } + } else if ( aString.EqualsAscii( SC_UNO_CJK_CLOCAL ) ) { @@ -1873,6 +1875,18 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const rtl::OUString& aPropertyNa { aRet <<= pDocShell->GetDialogContainer(); } + else if ( aString.EqualsAscii( SC_UNO_VBADOCOBJ ) ) + { + // PropertyValue seems extreme because we store + // the model ( as the value member ) of the PropertyValue that is + // itself a property of the model ( the intention however is to + // store something like a Workbook object... but we don't do that ) + // yet + beans::PropertyValue aProp; + aProp.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ThisExcelDoc") ); + aProp.Value <<= pDocShell->GetModel(); + aRet <<= aProp; + } else if ( aString.EqualsAscii( SC_UNO_RUNTIMEUID ) ) { aRet <<= getRuntimeUID(); |