[ooo-build-commit] Branch 'ooo-build-3-2' - patches/dev300 patches/vba
Noel Power
noelp at kemper.freedesktop.org
Wed Jan 6 08:51:58 PST 2010
patches/dev300/apply | 3
patches/vba/vba-word-executable-option.diff | 254 ++++++++++++++--------------
2 files changed, 137 insertions(+), 120 deletions(-)
New commits:
commit 58adb957f7be3778f8bdb80e403b3cfc62c516c5
Author: Noel Power <noel.power at novell.com>
Date: Wed Jan 6 16:49:55 2010 +0000
for consistency add 'exe' checkbox under Load/Save|VBA Properties options
* patches/dev300/apply:
* patches/vba/vba-word-executable-option.diff: re-enabled ( and re-worked )
diff --git a/patches/dev300/apply b/patches/dev300/apply
index 78b79b4..7718b49 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -1648,6 +1648,9 @@ vba-fix-listboxhang-n560355.diff, n#560355
vba-fireevents-from-apichange.diff, n#561639, n#539220
vba-macro-properties.diff, n#566030
+# for consistency use an exe option for controlling commented out
+# basic
+vba-word-executable-option.diff, Fong
[VBAUntested]
SectionOwner => noelpwer
diff --git a/patches/vba/vba-word-executable-option.diff b/patches/vba/vba-word-executable-option.diff
index 1201879..b149cdb 100644
--- a/patches/vba/vba-word-executable-option.diff
+++ b/patches/vba/vba-word-executable-option.diff
@@ -1,8 +1,8 @@
diff --git officecfg/registry/schema/org/openoffice/Office/Writer.xcs officecfg/registry/schema/org/openoffice/Office/Writer.xcs
-index 37bcf01..e54276b 100644
+index f7155fd..b8a6cf3 100644
--- officecfg/registry/schema/org/openoffice/Office/Writer.xcs
+++ officecfg/registry/schema/org/openoffice/Office/Writer.xcs
-@@ -6022,6 +6022,14 @@
+@@ -6057,6 +6057,14 @@
</info>
<value>true</value>
</prop>
@@ -18,20 +18,20 @@ index 37bcf01..e54276b 100644
<!-- OldPath: Filter/MS_Office/Basic/Word -->
<!-- OldLocation: soffice.cfg -->
diff --git svtools/inc/fltrcfg.hxx svtools/inc/fltrcfg.hxx
-index 351a0da..3999a81 100644
+index fdf5b3b..b200cba 100644
--- svtools/inc/fltrcfg.hxx
+++ svtools/inc/fltrcfg.hxx
@@ -51,6 +51,8 @@ public:
- void SetLoadWordBasicCode( sal_Bool bFlag );
- sal_Bool IsLoadWordBasicCode() const;
+ 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;
+ 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
+index 529e72b..5ed1033 100644
--- svtools/source/config/fltrcfg.cxx
+++ svtools/source/config/fltrcfg.cxx
@@ -64,6 +64,7 @@ using namespace com::sun::star::uno;
@@ -94,34 +94,34 @@ index 0fa7fcd..4df9ee2 100644
+// -----------------------------------------------------------------------
class SvtCalcFilterOptions_Impl : public SvtAppFilterOptions_Impl
{
- sal_Bool bLoadExecutable;
+ sal_Bool bLoadExecutable;
@@ -196,7 +243,7 @@ void SvtCalcFilterOptions_Impl::Load()
struct SvtFilterOptions_Impl
{
ULONG nFlags;
-- SvtAppFilterOptions_Impl aWriterCfg;
+- 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_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;
+ 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_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;
+ 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 );
+ return pImp->IsFlag( FILTERCFG_WORD_CODE );
}
+void SvtFilterOptions::SetLoadWordBasicExecutable( BOOL bFlag )
@@ -137,25 +137,25 @@ index 0fa7fcd..4df9ee2 100644
+
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
+ pImp->SetFlag( FILTERCFG_WORD_STORAGE, bFlag );
+diff --git svx/source/cui/optfltr.cxx svx/source/cui/optfltr.cxx
+index f8d185f..0ff9fb1 100644
+--- svx/source/cui/optfltr.cxx
++++ svx/source/cui/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 ) ),
+ : 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 ) ),
+ 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();
+ FreeResource();
+ aWBasicCodeCB.SetClickHdl( LINK( this, OfaMSFilterTabPage, LoadWordBasicCheckHdl_Impl ) );
- aEBasicCodeCB.SetClickHdl( LINK( this, OfaMSFilterTabPage, LoadExcelBasicCheckHdl_Impl ) );
+ aEBasicCodeCB.SetClickHdl( LINK( this, OfaMSFilterTabPage, LoadExcelBasicCheckHdl_Impl ) );
}
@@ -80,6 +82,12 @@ OfaMSFilterTabPage::~OfaMSFilterTabPage()
@@ -170,32 +170,32 @@ index a90d629..5233663 100644
+
IMPL_LINK( OfaMSFilterTabPage, LoadExcelBasicCheckHdl_Impl, CheckBox*, EMPTYARG )
{
- aEBasicExectblCB.Enable( aEBasicCodeCB.IsChecked() );
+ aEBasicExectblCB.Enable( aEBasicCodeCB.IsChecked() );
@@ -99,6 +107,8 @@ BOOL OfaMSFilterTabPage::FillItemSet( SfxItemSet& )
- BOOL bFlag;
- if( aWBasicCodeCB.GetSavedValue() != (bFlag = aWBasicCodeCB.IsChecked()))
- pOpt->SetLoadWordBasicCode( bFlag );
+ 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 );
+ if( aWBasicStgCB.GetSavedValue() != (bFlag = aWBasicStgCB.IsChecked()))
+ pOpt->SetLoadWordBasicStorage( bFlag );
@@ -127,8 +137,11 @@ void OfaMSFilterTabPage::Reset( const SfxItemSet& )
- aWBasicCodeCB.Check( pOpt->IsLoadWordBasicCode() );
- aWBasicCodeCB.SaveValue();
+ aWBasicCodeCB.Check( pOpt->IsLoadWordBasicCode() );
+ aWBasicCodeCB.SaveValue();
+ aWBasicWbctblCB.Check( pOpt->IsLoadWordBasicExecutable() );
+ aWBasicWbctblCB.SaveValue();
- aWBasicStgCB.Check( pOpt->IsLoadWordBasicStorage() );
- aWBasicStgCB.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
+ aEBasicCodeCB.Check( pOpt->IsLoadExcelBasicCode() );
+ aEBasicCodeCB.SaveValue();
+diff --git svx/source/cui/optfltr.hrc svx/source/cui/optfltr.hrc
index e53179e..a3c4aca 100644
---- svx/source/dialog/optfltr.hrc
-+++ svx/source/dialog/optfltr.hrc
+--- svx/source/cui/optfltr.hrc
++++ svx/source/cui/optfltr.hrc
@@ -43,6 +43,7 @@
#define CB_EBAS_STG 5
#define CB_PBAS_CODE 6
@@ -204,34 +204,34 @@ index e53179e..a3c4aca 100644
#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
+diff --git svx/source/cui/optfltr.hxx svx/source/cui/optfltr.hxx
+index e8acba8..7a86bba 100644
+--- svx/source/cui/optfltr.hxx
++++ svx/source/cui/optfltr.hxx
@@ -46,6 +46,7 @@ class OfaMSFilterTabPage : public SfxTabPage
{
FixedLine aMSWordGB;
- CheckBox aWBasicCodeCB;
+ CheckBox aWBasicCodeCB;
+ CheckBox aWBasicWbctblCB;
- CheckBox aWBasicStgCB;
+ CheckBox aWBasicStgCB;
FixedLine aMSExcelGB;
- CheckBox aEBasicCodeCB;
+ CheckBox aEBasicCodeCB;
@@ -58,6 +59,7 @@ class OfaMSFilterTabPage : public SfxTabPage
- OfaMSFilterTabPage( Window* pParent, const SfxItemSet& rSet );
- virtual ~OfaMSFilterTabPage();
+ OfaMSFilterTabPage( Window* pParent, const SfxItemSet& rSet );
+ virtual ~OfaMSFilterTabPage();
+ DECL_LINK( LoadWordBasicCheckHdl_Impl, CheckBox* );
- DECL_LINK( LoadExcelBasicCheckHdl_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
+diff --git svx/source/cui/optfltr.src svx/source/cui/optfltr.src
+index 9dd3dd2..89596aa 100644
+--- svx/source/cui/optfltr.src
++++ svx/source/cui/optfltr.src
@@ -54,9 +54,16 @@ TabPage RID_OFAPAGE_MSFILTEROPT
- TabStop = TRUE ;
- Text [ en-US ] = "Load Basic ~code";
- };
+ TabStop = TRUE ;
+ Text [ en-US ] = "Load Basic ~code";
+ };
+ CheckBox CB_WBAS_WBCTBL
+ {
+ Pos = MAP_APPFONT ( 22 , 28 ) ;
@@ -239,80 +239,94 @@ index 9eddd00..7fb78bd 100644
+ TabStop = TRUE ;
+ Text [ en-US ] = "E~xecutable code";
+ };
- CheckBox CB_WBAS_STG
- {
-- Pos = MAP_APPFONT ( 12 , 28 ) ;
+ 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";
+ 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 , 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 ) ;
+ 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 ) ;
+ 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 ) ;
+ 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";
+ 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 , 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 ) ;
+ 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 ) ;
+ 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";
+ 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
+index 23df626..24f1907 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)
+@@ -3958,10 +3958,11 @@ bool SwWW8ImplReader::ReadGlobalTemplateSettings( const rtl::OUString& sCreatedF
+ pVBAFlags->IsLoadWordBasicCode(),
+ 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 );
+ lcl_createTemplateToProjectEntry( xPrjNameCache, aURL, aVBasic.GetVBAProjectName() );
+ // Read toolbars & menus
+ SvStorageStreamRef refMainStream = rRoot->OpenSotStream( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("WordDocument") ) );
+@@ -4295,7 +4296,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);
+ // dissable below for 3.1 at the moment, 'cause it's kinda immature
+ // similarly the project reference in svx/source/msvba
+ #if 1
More information about the ooo-build-commit
mailing list