ooo-build r14772 - in trunk: . patches/dev300 patches/vba
- From: pflin svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r14772 - in trunk: . patches/dev300 patches/vba
- Date: Mon, 8 Dec 2008 06:33:44 +0000 (UTC)
Author: pflin
Date: Mon Dec 8 06:33:43 2008
New Revision: 14772
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14772&view=rev
Log:
2008-12-08 Fong Lin <pflin novell com>
* patches/vba/vba-word-executable-option.diff: Add a UI option to
indicate whether word VBA macros are imported without comments to
be executable.
* patches/dev300/apply: apply these new patches.
Added:
trunk/patches/vba/vba-word-executable-option.diff
Modified:
trunk/ChangeLog
trunk/patches/dev300/apply
Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply (original)
+++ trunk/patches/dev300/apply Mon Dec 8 06:33:43 2008
@@ -1753,6 +1753,7 @@
[ VBAObjects ]
# vba for word support
vba-word-support.diff, Fong
+vba-word-executable-option.diff, Fong
[ VBAObjects < dev300-m36 ]
patch_i92329.diff, i#92329
Added: trunk/patches/vba/vba-word-executable-option.diff
==============================================================================
--- (empty file)
+++ trunk/patches/vba/vba-word-executable-option.diff Mon Dec 8 06:33:43 2008
@@ -0,0 +1,318 @@
+diff --git officecfg/registry/schema/org/openoffice/Office/Writer.xcs officecfg/registry/schema/org/openoffice/Office/Writer.xcs
+index 37bcf01..e54276b 100644
+--- officecfg/registry/schema/org/openoffice/Office/Writer.xcs
++++ officecfg/registry/schema/org/openoffice/Office/Writer.xcs
+@@ -6022,6 +6022,14 @@
+ </info>
+ <value>true</value>
+ </prop>
++ <prop oor:name="Executable" oor:type="xs:boolean">
++ <info>
++ <author>pflin</author>
++ <desc>Indicates whether VBA macros are imported without comments to be executable.</desc>
++ <label>Executable code</label>
++ </info>
++ <value>true</value>
++ </prop>
+ <prop oor:name="Save" oor:type="xs:boolean">
+ <!-- OldPath: Filter/MS_Office/Basic/Word -->
+ <!-- OldLocation: soffice.cfg -->
+diff --git svtools/inc/fltrcfg.hxx svtools/inc/fltrcfg.hxx
+index 351a0da..3999a81 100644
+--- svtools/inc/fltrcfg.hxx
++++ svtools/inc/fltrcfg.hxx
+@@ -51,6 +51,8 @@ public:
+
+ void SetLoadWordBasicCode( sal_Bool bFlag );
+ sal_Bool IsLoadWordBasicCode() const;
++ void SetLoadWordBasicExecutable( sal_Bool bFlag );
++ sal_Bool IsLoadWordBasicExecutable() const;
+ void SetLoadWordBasicStorage( sal_Bool bFlag );
+ sal_Bool IsLoadWordBasicStorage() const;
+
+diff --git svtools/source/config/fltrcfg.cxx svtools/source/config/fltrcfg.cxx
+index 0fa7fcd..4df9ee2 100644
+--- svtools/source/config/fltrcfg.cxx
++++ svtools/source/config/fltrcfg.cxx
+@@ -64,6 +64,7 @@ using namespace com::sun::star::uno;
+ #define FILTERCFG_ENABLE_EXCEL_PREVIEW 0x40000
+ #define FILTERCFG_ENABLE_WORD_PREVIEW 0x80000
+ #define FILTERCFG_USE_ENHANCED_FIELDS 0x100000
++#define FILTERCFG_WORD_WBCTBL 0x200000
+
+ static SvtFilterOptions* pOptions=0;
+
+@@ -145,6 +146,52 @@ void SvtAppFilterOptions_Impl::Load()
+ }
+
+ // -----------------------------------------------------------------------
++class SvtWriterFilterOptions_Impl : public SvtAppFilterOptions_Impl
++{
++ sal_Bool bLoadExecutable;
++public:
++ SvtWriterFilterOptions_Impl(const OUString& rRoot) :
++ SvtAppFilterOptions_Impl(rRoot),
++ bLoadExecutable(sal_False)
++ {}
++ virtual void Commit();
++ void Load();
++
++ sal_Bool IsLoadExecutable() const {return bLoadExecutable;}
++ void SetLoadExecutable(sal_Bool bSet)
++ {
++ if(bSet != bLoadExecutable)
++ SetModified();
++ bLoadExecutable = bSet;
++ }
++};
++
++void SvtWriterFilterOptions_Impl::Commit()
++{
++ SvtAppFilterOptions_Impl::Commit();
++
++ Sequence<OUString> aNames(1);
++ aNames[0] = C2U("Executable");
++ Sequence<Any> aValues(1);
++ aValues[0] <<= bLoadExecutable;
++
++ PutProperties(aNames, aValues);
++}
++
++void SvtWriterFilterOptions_Impl::Load()
++{
++ SvtAppFilterOptions_Impl::Load();
++
++ Sequence<OUString> aNames(1);
++ aNames[0] = C2U("Executable");
++
++ Sequence<Any> aValues = GetProperties(aNames);
++ const Any* pValues = aValues.getConstArray();
++ if(pValues[0].hasValue())
++ bLoadExecutable = *(sal_Bool*)pValues[0].getValue();
++}
++
++// -----------------------------------------------------------------------
+ class SvtCalcFilterOptions_Impl : public SvtAppFilterOptions_Impl
+ {
+ sal_Bool bLoadExecutable;
+@@ -196,7 +243,7 @@ void SvtCalcFilterOptions_Impl::Load()
+ struct SvtFilterOptions_Impl
+ {
+ ULONG nFlags;
+- SvtAppFilterOptions_Impl aWriterCfg;
++ SvtWriterFilterOptions_Impl aWriterCfg;
+ SvtCalcFilterOptions_Impl aCalcCfg;
+ SvtAppFilterOptions_Impl aImpressCfg;
+
+@@ -241,6 +288,7 @@ void SvtFilterOptions_Impl::SetFlag( ULONG nFlag, BOOL bSet )
+ {
+ case FILTERCFG_WORD_CODE: aWriterCfg.SetLoad(bSet);break;
+ case FILTERCFG_WORD_STORAGE: aWriterCfg.SetSave(bSet);break;
++ case FILTERCFG_WORD_WBCTBL: aWriterCfg.SetLoadExecutable(bSet);break;
+ case FILTERCFG_EXCEL_CODE: aCalcCfg.SetLoad(bSet);break;
+ case FILTERCFG_EXCEL_STORAGE: aCalcCfg.SetSave(bSet);break;
+ case FILTERCFG_EXCEL_EXECTBL: aCalcCfg.SetLoadExecutable(bSet);break;
+@@ -263,6 +311,7 @@ BOOL SvtFilterOptions_Impl::IsFlag( ULONG nFlag ) const
+ {
+ case FILTERCFG_WORD_CODE : bRet = aWriterCfg.IsLoad();break;
+ case FILTERCFG_WORD_STORAGE : bRet = aWriterCfg.IsSave();break;
++ case FILTERCFG_WORD_WBCTBL : bRet = aWriterCfg.IsLoadExecutable();break;
+ case FILTERCFG_EXCEL_CODE : bRet = aCalcCfg.IsLoad();break;
+ case FILTERCFG_EXCEL_STORAGE : bRet = aCalcCfg.IsSave();break;
+ case FILTERCFG_EXCEL_EXECTBL : bRet = aCalcCfg.IsLoadExecutable();break;
+@@ -405,6 +454,17 @@ BOOL SvtFilterOptions::IsLoadWordBasicCode() const
+ return pImp->IsFlag( FILTERCFG_WORD_CODE );
+ }
+
++void SvtFilterOptions::SetLoadWordBasicExecutable( BOOL bFlag )
++{
++ pImp->SetFlag( FILTERCFG_WORD_WBCTBL, bFlag );
++ SetModified();
++}
++
++BOOL SvtFilterOptions::IsLoadWordBasicExecutable() const
++{
++ return pImp->IsFlag( FILTERCFG_WORD_WBCTBL );
++}
++
+ void SvtFilterOptions::SetLoadWordBasicStorage( BOOL bFlag )
+ {
+ pImp->SetFlag( FILTERCFG_WORD_STORAGE, bFlag );
+diff --git svx/source/dialog/optfltr.cxx svx/source/dialog/optfltr.cxx
+index a90d629..5233663 100644
+--- svx/source/dialog/optfltr.cxx
++++ svx/source/dialog/optfltr.cxx
+@@ -62,6 +62,7 @@ OfaMSFilterTabPage::OfaMSFilterTabPage(Window* pParent, const SfxItemSet& rSet)
+ : SfxTabPage( pParent, SVX_RES( RID_OFAPAGE_MSFILTEROPT ), rSet ),
+ aMSWordGB ( this, SVX_RES( GB_WORD ) ),
+ aWBasicCodeCB ( this, SVX_RES( CB_WBAS_CODE ) ),
++ aWBasicWbctblCB ( this, SVX_RES( CB_WBAS_WBCTBL ) ),
+ aWBasicStgCB ( this, SVX_RES( CB_WBAS_STG ) ),
+ aMSExcelGB ( this, SVX_RES( GB_EXCEL ) ),
+ aEBasicCodeCB ( this, SVX_RES( CB_EBAS_CODE ) ),
+@@ -73,6 +74,7 @@ OfaMSFilterTabPage::OfaMSFilterTabPage(Window* pParent, const SfxItemSet& rSet)
+ {
+ FreeResource();
+
++ aWBasicCodeCB.SetClickHdl( LINK( this, OfaMSFilterTabPage, LoadWordBasicCheckHdl_Impl ) );
+ aEBasicCodeCB.SetClickHdl( LINK( this, OfaMSFilterTabPage, LoadExcelBasicCheckHdl_Impl ) );
+ }
+
+@@ -80,6 +82,12 @@ OfaMSFilterTabPage::~OfaMSFilterTabPage()
+ {
+ }
+
++IMPL_LINK( OfaMSFilterTabPage, LoadWordBasicCheckHdl_Impl, CheckBox*, EMPTYARG )
++{
++ aWBasicWbctblCB.Enable( aWBasicCodeCB.IsChecked() );
++ return 0;
++}
++
+ IMPL_LINK( OfaMSFilterTabPage, LoadExcelBasicCheckHdl_Impl, CheckBox*, EMPTYARG )
+ {
+ aEBasicExectblCB.Enable( aEBasicCodeCB.IsChecked() );
+@@ -99,6 +107,8 @@ BOOL OfaMSFilterTabPage::FillItemSet( SfxItemSet& )
+ BOOL bFlag;
+ if( aWBasicCodeCB.GetSavedValue() != (bFlag = aWBasicCodeCB.IsChecked()))
+ pOpt->SetLoadWordBasicCode( bFlag );
++ if( aWBasicWbctblCB.GetSavedValue() != (bFlag = aWBasicWbctblCB.IsChecked()))
++ pOpt->SetLoadWordBasicExecutable( bFlag );
+ if( aWBasicStgCB.GetSavedValue() != (bFlag = aWBasicStgCB.IsChecked()))
+ pOpt->SetLoadWordBasicStorage( bFlag );
+
+@@ -127,8 +137,11 @@ void OfaMSFilterTabPage::Reset( const SfxItemSet& )
+
+ aWBasicCodeCB.Check( pOpt->IsLoadWordBasicCode() );
+ aWBasicCodeCB.SaveValue();
++ aWBasicWbctblCB.Check( pOpt->IsLoadWordBasicExecutable() );
++ aWBasicWbctblCB.SaveValue();
+ aWBasicStgCB.Check( pOpt->IsLoadWordBasicStorage() );
+ aWBasicStgCB.SaveValue();
++ LoadWordBasicCheckHdl_Impl( &aWBasicCodeCB );
+
+ aEBasicCodeCB.Check( pOpt->IsLoadExcelBasicCode() );
+ aEBasicCodeCB.SaveValue();
+diff --git svx/source/dialog/optfltr.hrc svx/source/dialog/optfltr.hrc
+index e53179e..a3c4aca 100644
+--- svx/source/dialog/optfltr.hrc
++++ svx/source/dialog/optfltr.hrc
+@@ -43,6 +43,7 @@
+ #define CB_EBAS_STG 5
+ #define CB_PBAS_CODE 6
+ #define CB_PBAS_STG 7
++#define CB_WBAS_WBCTBL 8
+
+ #define CLB_SETTINGS 1
+ #define ST_CHG_MATH 1
+diff --git svx/source/dialog/optfltr.hxx svx/source/dialog/optfltr.hxx
+index aafe4a8..6119cfc 100644
+--- svx/source/dialog/optfltr.hxx
++++ svx/source/dialog/optfltr.hxx
+@@ -46,6 +46,7 @@ class OfaMSFilterTabPage : public SfxTabPage
+ {
+ FixedLine aMSWordGB;
+ CheckBox aWBasicCodeCB;
++ CheckBox aWBasicWbctblCB;
+ CheckBox aWBasicStgCB;
+ FixedLine aMSExcelGB;
+ CheckBox aEBasicCodeCB;
+@@ -58,6 +59,7 @@ class OfaMSFilterTabPage : public SfxTabPage
+ OfaMSFilterTabPage( Window* pParent, const SfxItemSet& rSet );
+ virtual ~OfaMSFilterTabPage();
+
++ DECL_LINK( LoadWordBasicCheckHdl_Impl, CheckBox* );
+ DECL_LINK( LoadExcelBasicCheckHdl_Impl, CheckBox* );
+ public:
+
+diff --git svx/source/dialog/optfltr.src svx/source/dialog/optfltr.src
+index 9eddd00..7fb78bd 100644
+--- svx/source/dialog/optfltr.src
++++ svx/source/dialog/optfltr.src
+@@ -54,9 +54,16 @@ TabPage RID_OFAPAGE_MSFILTEROPT
+ TabStop = TRUE ;
+ Text [ en-US ] = "Load Basic ~code";
+ };
++ CheckBox CB_WBAS_WBCTBL
++ {
++ Pos = MAP_APPFONT ( 22 , 28 ) ;
++ Size = MAP_APPFONT ( 236 , 10 ) ;
++ TabStop = TRUE ;
++ Text [ en-US ] = "E~xecutable code";
++ };
+ CheckBox CB_WBAS_STG
+ {
+- Pos = MAP_APPFONT ( 12 , 28 ) ;
++ Pos = MAP_APPFONT ( 12 , 42 ) ;
+ Size = MAP_APPFONT ( 236 , 10 ) ;
+ TabStop = TRUE ;
+ Text [ en-US ] = "Save ~original Basic code";
+@@ -64,27 +71,27 @@ TabPage RID_OFAPAGE_MSFILTEROPT
+
+ FixedLine GB_EXCEL
+ {
+- Pos = MAP_APPFONT ( 6 , 44 ) ;
++ Pos = MAP_APPFONT ( 6 , 58 ) ;
+ Size = MAP_APPFONT ( 248 , 8 ) ;
+ Text [ en-US ] = "Microsoft Excel 97/2000/XP";
+ };
+ CheckBox CB_EBAS_CODE
+ {
+- Pos = MAP_APPFONT ( 12 , 55 ) ;
++ Pos = MAP_APPFONT ( 12 , 69 ) ;
+ Size = MAP_APPFONT ( 236 , 10 ) ;
+ TabStop = TRUE ;
+ Text [ en-US ] = "Lo~ad Basic code";
+ };
+ CheckBox CB_EBAS_EXECTBL
+ {
+- Pos = MAP_APPFONT ( 22 , 69 ) ;
++ Pos = MAP_APPFONT ( 22 , 83 ) ;
+ Size = MAP_APPFONT ( 236 , 10 ) ;
+ TabStop = TRUE ;
+ Text [ en-US ] = "E~xecutable code";
+ };
+ CheckBox CB_EBAS_STG
+ {
+- Pos = MAP_APPFONT ( 12 , 83 ) ;
++ Pos = MAP_APPFONT ( 12 , 97 ) ;
+ Size = MAP_APPFONT ( 236 , 10 ) ;
+ TabStop = TRUE ;
+ Text [ en-US ] = "Sa~ve original Basic code";
+@@ -92,20 +99,20 @@ TabPage RID_OFAPAGE_MSFILTEROPT
+
+ FixedLine GB_PPOINT
+ {
+- Pos = MAP_APPFONT ( 6 , 99 ) ;
++ Pos = MAP_APPFONT ( 6 , 113 ) ;
+ Size = MAP_APPFONT ( 248 , 8 ) ;
+ Text [ en-US ] = "Microsoft PowerPoint 97/2000/XP";
+ };
+ CheckBox CB_PBAS_CODE
+ {
+- Pos = MAP_APPFONT ( 12 , 110 ) ;
++ Pos = MAP_APPFONT ( 12 , 124 ) ;
+ Size = MAP_APPFONT ( 236 , 10 ) ;
+ TabStop = TRUE ;
+ Text [ en-US ] = "Load Ba~sic code";
+ };
+ CheckBox CB_PBAS_STG
+ {
+- Pos = MAP_APPFONT ( 12 , 124 ) ;
++ Pos = MAP_APPFONT ( 12 , 138 ) ;
+ Size = MAP_APPFONT ( 236 , 10 ) ;
+ TabStop = TRUE ;
+ Text [ en-US ] = "Sav~e original Basic code";
+diff --git sw/source/filter/ww8/ww8par.cxx sw/source/filter/ww8/ww8par.cxx
+index 5055206..fe3bd83 100644
+--- sw/source/filter/ww8/ww8par.cxx
++++ sw/source/filter/ww8/ww8par.cxx
+@@ -4024,7 +4024,8 @@ ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
+ pVBAFlags->IsLoadWordBasicStorage() );
+ String s1(CREATE_CONST_ASC("Macros"));
+ String s2(CREATE_CONST_ASC("VBA"));
+- int nRet = aVBasic.Import( s1, s2, ! pVBAFlags->IsLoadWordBasicCode() );
++ bool bAsComment = !pVBAFlags->IsLoadWordBasicExecutable();
++ int nRet = aVBasic.Import( s1, s2, bAsComment );
+ if( 2 & nRet )
+ {
+ maTracer.Log(sw::log::eContainsVisualBasic);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]