diff options
70 files changed, 576 insertions, 1224 deletions
diff --git a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx index d6bab94cb..24b507cdb 100644 --- a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx +++ b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx @@ -34,7 +34,7 @@ #include "accessibility/extended/accessiblebrowseboxcell.hxx" #endif #include <cppuhelper/implbase2.hxx> -#include <vcl/wintypes.hxx> +#include <tools/wintypes.hxx> // ============================================================================ namespace accessibility { diff --git a/accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx b/accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx index 8444ed9ed..16c996f27 100644 --- a/accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx +++ b/accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx @@ -29,8 +29,7 @@ #include <tools/gen.hxx> #include <tools/string.hxx> -#include <vcl/wintypes.hxx> -#include <tools/gen.hxx> +#include <tools/wintypes.hxx> namespace com { namespace sun { namespace star { namespace datatransfer { namespace clipboard { class XClipboard; diff --git a/automation/source/server/statemnt.cxx b/automation/source/server/statemnt.cxx index 0cdc26a10..5d88b6d5e 100644 --- a/automation/source/server/statemnt.cxx +++ b/automation/source/server/statemnt.cxx @@ -34,7 +34,7 @@ #include <comphelper/processfactory.hxx> #include <comphelper/uieventslogger.hxx> -#include <vcl/wintypes.hxx> +#include <tools/wintypes.hxx> #ifndef _DIALOG_HXX //autogen #include <vcl/dialog.hxx> #endif @@ -79,7 +79,6 @@ #include <vcl/fixed.hxx> #include <vcl/wrkwin.hxx> #include <osl/diagnose.h> -#include <vcl/wintypes.hxx> #include <svtools/valueset.hxx> #include <svtools/roadmap.hxx> #include <svtools/table/tablecontrol.hxx> diff --git a/automation/source/server/statemnt.hxx b/automation/source/server/statemnt.hxx index b0d2f6c4b..01db8775e 100644 --- a/automation/source/server/statemnt.hxx +++ b/automation/source/server/statemnt.hxx @@ -40,7 +40,7 @@ #ifndef _STATEMNT_HXX #define _STATEMNT_HXX -#include <vcl/wintypes.hxx> +#include <tools/wintypes.hxx> #include <tools/string.hxx> #include <tools/debug.hxx> #include <tools/time.hxx> diff --git a/basctl/source/basicide/basicbox.cxx b/basctl/source/basicide/basicbox.cxx index 65a1767ab..7946f974d 100644 --- a/basctl/source/basicide/basicbox.cxx +++ b/basctl/source/basicide/basicbox.cxx @@ -144,9 +144,7 @@ void DocListenerBox::onDocumentSaveAsDone( const ScriptDocument& /*_rDocument*/ void DocListenerBox::onDocumentClosed( const ScriptDocument& /*_rDocument*/ ) { - if ( SFX_APP()->IsInBasicCall() ) - // Nicht wenn Office beendet - FillBox(); + FillBox(); } void DocListenerBox::onDocumentTitleChanged( const ScriptDocument& /*_rDocument*/ ) diff --git a/basctl/source/basicide/basicprint.src b/basctl/source/basicide/basicprint.src index a5d9a8351..caa5241c5 100644 --- a/basctl/source/basicide/basicprint.src +++ b/basctl/source/basicide/basicprint.src @@ -33,8 +33,6 @@ StringArray RID_PRINTDLG_STRLIST { < "Print range"; >; < "All ~Pages"; >; - < "Print all pages of the printable content."; >; < "Pa~ges"; >; - < "Print only some pages of the printable content."; >; }; }; diff --git a/basctl/source/basicide/basicrenderable.cxx b/basctl/source/basicide/basicrenderable.cxx index d1679c76a..e374d8177 100644 --- a/basctl/source/basicide/basicrenderable.cxx +++ b/basctl/source/basicide/basicrenderable.cxx @@ -45,8 +45,8 @@ BasicRenderable::BasicRenderable( IDEBaseWindow* pWin ) , mpWindow( pWin ) { ResStringArray aStrings( IDEResId( RID_PRINTDLG_STRLIST ) ); - DBG_ASSERT( aStrings.Count() >= 5, "resource incomplete" ); - if( aStrings.Count() < 5 ) // bad resource ? + DBG_ASSERT( aStrings.Count() >= 3, "resource incomplete" ); + if( aStrings.Count() < 3 ) // bad resource ? return; m_aUIProperties.realloc( 3 ); @@ -63,13 +63,13 @@ BasicRenderable::BasicRenderable( IDEBaseWindow* pWin ) // create a choice for the range to print rtl::OUString aPrintContentName( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) ); Sequence< rtl::OUString > aChoices( 2 ); - Sequence< rtl::OUString > aHelpTexts( 2 ); + Sequence< rtl::OUString > aHelpIds( 2 ); aChoices[0] = aStrings.GetString( 1 ); - aHelpTexts[0] = aStrings.GetString( 2 ); - aChoices[1] = aStrings.GetString( 3 ); - aHelpTexts[1] = aStrings.GetString( 4 ); + aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0" ) ); + aChoices[1] = aStrings.GetString( 2 ); + aHelpIds[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1" ) ); m_aUIProperties[1].Value = getChoiceControlOpt( rtl::OUString(), - aHelpTexts, + aHelpIds, aPrintContentName, aChoices, 0 ); diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index 93625b0ba..35fd08b9c 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -1332,7 +1332,7 @@ USHORT ModulWindow::StartSearchAndReplace( const SvxSearchItem& rSearchItem, BOO return nFound; } -SfxUndoManager* __EXPORT ModulWindow::GetUndoManager() +::svl::IUndoManager* __EXPORT ModulWindow::GetUndoManager() { if ( GetEditEngine() ) return &GetEditEngine()->GetUndoManager(); diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx index b78eaf8dd..d4258dce6 100644 --- a/basctl/source/basicide/baside2.hxx +++ b/basctl/source/basicide/baside2.hxx @@ -443,7 +443,8 @@ public: virtual void BasicStarted(); virtual void BasicStopped(); - virtual SfxUndoManager* GetUndoManager(); + virtual ::svl::IUndoManager* + GetUndoManager(); const ::rtl::OUString& GetModule() const { return m_aModule; } void SetModule( const ::rtl::OUString& aModule ) { m_aModule = aModule; } diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index f98f31a4d..c03ee3d59 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -1281,7 +1281,7 @@ BOOL __EXPORT DialogWindow::IsModified() return pEditor->IsModified(); } -SfxUndoManager* __EXPORT DialogWindow::GetUndoManager() +::svl::IUndoManager* __EXPORT DialogWindow::GetUndoManager() { return pUndoMgr; } diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index 71d158503..eee7c5a11 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -210,8 +210,6 @@ void BasicIDEShell::Init() SetName( String( RTL_CONSTASCII_USTRINGPARAM( "BasicIDE" ) ) ); SetHelpId( SVX_INTERFACE_BASIDE_VIEWSH ); - SFX_APP()->EnterBasicCall(); - LibBoxControl::RegisterControl( SID_BASICIDE_LIBSELECTOR ); LanguageBoxControl::RegisterControl( SID_BASICIDE_CURRENT_LANG ); @@ -289,7 +287,6 @@ __EXPORT BasicIDEShell::~BasicIDEShell() // ObjSh loslaesst. Es wusste auch keiner mehr wozu das gut war. // GetViewFrame()->GetObjectShell()->Broadcast( SfxSimpleHint( SFX_HINT_DYING ) ); - SFX_APP()->LeaveBasicCall(); IDE_DLL()->GetExtraData()->ShellInCriticalSection() = FALSE; GnBasicIDEShellCount--; @@ -554,9 +551,9 @@ void BasicIDEShell::ArrangeTabBar() -SfxUndoManager* BasicIDEShell::GetUndoManager() +::svl::IUndoManager* BasicIDEShell::GetUndoManager() { - SfxUndoManager* pMgr = NULL; + ::svl::IUndoManager* pMgr = NULL; if( pCurWin ) pMgr = pCurWin->GetUndoManager(); diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx index 9f9af5724..b9ba836b7 100644 --- a/basctl/source/basicide/basobj2.cxx +++ b/basctl/source/basicide/basobj2.cxx @@ -30,23 +30,29 @@ #include <ide_pch.hxx> -#include <vector> -#include <algorithm> -#include <basic/sbx.hxx> -#include <unotools/moduleoptions.hxx> +#include "basobj.hxx" +#include "iderdll.hxx" +#include "iderdll2.hxx" +#include "iderid.hxx" +#include "macrodlg.hxx" +#include "moduldlg.hxx" +#include "basidesh.hxx" +#include "basidesh.hrc" +#include "baside2.hxx" +#include "basicmod.hxx" +#include "basdoc.hxx" + #include <com/sun/star/document/XEmbeddedScripts.hpp> #include <com/sun/star/document/XScriptInvocationContext.hpp> -#include <basobj.hxx> -#include <iderdll.hxx> -#include <iderdll2.hxx> -#include <iderid.hxx> -#include <macrodlg.hxx> -#include <moduldlg.hxx> -#include <basidesh.hxx> -#include <basidesh.hrc> -#include <baside2.hxx> -#include <basicmod.hxx> -#include <basdoc.hxx> + +#include <basic/sbx.hxx> +#include <framework/documentundoguard.hxx> +#include <tools/diagnose_ex.h> +#include <unotools/moduleoptions.hxx> + +#include <vector> +#include <algorithm> +#include <memory> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -216,6 +222,51 @@ bool RenameModule( Window* pErrorParent, const ScriptDocument& rDocument, const return true; } + +//---------------------------------------------------------------------------- + +namespace +{ + struct MacroExecutionData + { + ScriptDocument aDocument; + SbMethodRef xMethod; + + MacroExecutionData() + :aDocument( ScriptDocument::NoDocument ) + ,xMethod( NULL ) + { + } + }; + + class MacroExecution + { + public: + DECL_STATIC_LINK( MacroExecution, ExecuteMacroEvent, MacroExecutionData* ); + }; + + + IMPL_STATIC_LINK( MacroExecution, ExecuteMacroEvent, MacroExecutionData*, i_pData ) + { + (void)pThis; + ENSURE_OR_RETURN( i_pData, "wrong MacroExecutionData", 0L ); + // take ownership of the data + ::std::auto_ptr< MacroExecutionData > pData( i_pData ); + + DBG_ASSERT( pData->xMethod->GetParent()->GetFlags() & SBX_EXTSEARCH, "Kein EXTSEARCH!" ); + + // in case this is a document-local macro, try to protect the document's Undo Manager from + // flawed scripts + ::std::auto_ptr< ::framework::DocumentUndoGuard > pUndoGuard; + if ( pData->aDocument.isDocument() ) + pUndoGuard.reset( new ::framework::DocumentUndoGuard( pData->aDocument.getDocument() ) ); + + BasicIDE::RunMethod( pData->xMethod ); + + return 1L; + } +} + //---------------------------------------------------------------------------- ::rtl::OUString ChooseMacro( const uno::Reference< frame::XModel >& rxLimitToDocument, BOOL bChooseOnly, const ::rtl::OUString& rMacroDesc ) @@ -225,13 +276,12 @@ bool RenameModule( Window* pErrorParent, const ScriptDocument& rDocument, const BasicIDEDLL::Init(); IDE_DLL()->GetExtraData()->ChoosingMacro() = TRUE; - SFX_APP()->EnterBasicCall(); String aScriptURL; BOOL bError = FALSE; SbMethod* pMethod = NULL; - MacroChooser* pChooser = new MacroChooser( NULL, TRUE ); + ::std::auto_ptr< MacroChooser > pChooser( new MacroChooser( NULL, TRUE ) ); if ( bChooseOnly || !SvtModuleOptions().IsBasicIDE() ) pChooser->SetMode( MACROCHOOSER_CHOOSEONLY ); @@ -251,103 +301,95 @@ bool RenameModule( Window* pErrorParent, const ScriptDocument& rDocument, const if ( !pMethod && pChooser->GetMode() == MACROCHOOSER_RECORDING ) pMethod = pChooser->CreateMacro(); - if ( pMethod ) + if ( !pMethod ) + break; + + SbModule* pModule = pMethod->GetModule(); + ENSURE_OR_BREAK( pModule, "BasicIDE::ChooseMacro: No Module found!" ); + + StarBASIC* pBasic = (StarBASIC*)pModule->GetParent(); + ENSURE_OR_BREAK( pBasic, "BasicIDE::ChooseMacro: No Basic found!" ); + + BasicManager* pBasMgr = BasicIDE::FindBasicManager( pBasic ); + ENSURE_OR_BREAK( pBasMgr, "BasicIDE::ChooseMacro: No BasicManager found!" ); + + // name + String aName; + aName += pBasic->GetName(); + aName += '.'; + aName += pModule->GetName(); + aName += '.'; + aName += pMethod->GetName(); + + // language + String aLanguage = String::CreateFromAscii("Basic"); + + // location + String aLocation; + ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) ); + if ( aDocument.isDocument() ) { - SbModule* pModule = pMethod->GetModule(); - DBG_ASSERT(pModule, "BasicIDE::ChooseMacro: No Module found!"); - if ( pModule ) - { - StarBASIC* pBasic = (StarBASIC*)pModule->GetParent(); - DBG_ASSERT(pBasic, "BasicIDE::ChooseMacro: No Basic found!"); - if ( pBasic ) - { - BasicManager* pBasMgr = BasicIDE::FindBasicManager( pBasic ); - DBG_ASSERT(pBasMgr, "BasicIDE::ChooseMacro: No BasicManager found!"); - if ( pBasMgr ) - { - // name - String aName; - aName += pBasic->GetName(); - aName += '.'; - aName += pModule->GetName(); - aName += '.'; - aName += pMethod->GetName(); - - // language - String aLanguage = String::CreateFromAscii("Basic"); - - // location - String aLocation; - ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) ); - if ( aDocument.isDocument() ) - { - // document basic - aLocation = String::CreateFromAscii("document"); - - if ( rxLimitToDocument.is() ) - { - uno::Reference< frame::XModel > xLimitToDocument( rxLimitToDocument ); - - uno::Reference< document::XEmbeddedScripts > xScripts( rxLimitToDocument, UNO_QUERY ); - if ( !xScripts.is() ) - { // the document itself does not support embedding scripts - uno::Reference< document::XScriptInvocationContext > xContext( rxLimitToDocument, UNO_QUERY ); - if ( xContext.is() ) - xScripts = xContext->getScriptContainer(); - if ( xScripts.is() ) - { // but it is able to refer to a document which actually does support this - xLimitToDocument.set( xScripts, UNO_QUERY ); - if ( !xLimitToDocument.is() ) - { - OSL_ENSURE( false, "BasicIDE::ChooseMacro: a script container which is no document!?" ); - xLimitToDocument = rxLimitToDocument; - } - } - } - - if ( xLimitToDocument != aDocument.getDocument() ) - { - // error - bError = TRUE; - ErrorBox( NULL, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_ERRORCHOOSEMACRO ) ) ).Execute(); - } - } - } - else - { - // application basic - aLocation = String::CreateFromAscii("application"); - } + // document basic + aLocation = String::CreateFromAscii("document"); - // script URL - if ( !bError ) + if ( rxLimitToDocument.is() ) + { + uno::Reference< frame::XModel > xLimitToDocument( rxLimitToDocument ); + + uno::Reference< document::XEmbeddedScripts > xScripts( rxLimitToDocument, UNO_QUERY ); + if ( !xScripts.is() ) + { // the document itself does not support embedding scripts + uno::Reference< document::XScriptInvocationContext > xContext( rxLimitToDocument, UNO_QUERY ); + if ( xContext.is() ) + xScripts = xContext->getScriptContainer(); + if ( xScripts.is() ) + { // but it is able to refer to a document which actually does support this + xLimitToDocument.set( xScripts, UNO_QUERY ); + if ( !xLimitToDocument.is() ) { - aScriptURL = String::CreateFromAscii("vnd.sun.star.script:"); - aScriptURL += aName; - aScriptURL += String::CreateFromAscii("?language="); - aScriptURL += aLanguage; - aScriptURL += String::CreateFromAscii("&location="); - aScriptURL += aLocation; + OSL_ENSURE( false, "BasicIDE::ChooseMacro: a script container which is no document!?" ); + xLimitToDocument = rxLimitToDocument; } } } + + if ( xLimitToDocument != aDocument.getDocument() ) + { + // error + bError = TRUE; + ErrorBox( NULL, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_ERRORCHOOSEMACRO ) ) ).Execute(); + } } } + else + { + // application basic + aLocation = String::CreateFromAscii("application"); + } + + // script URL + if ( !bError ) + { + aScriptURL = String::CreateFromAscii("vnd.sun.star.script:"); + aScriptURL += aName; + aScriptURL += String::CreateFromAscii("?language="); + aScriptURL += aLanguage; + aScriptURL += String::CreateFromAscii("&location="); + aScriptURL += aLocation; + } - if ( pMethod && !rxLimitToDocument.is() ) + if ( !rxLimitToDocument.is() ) { - pMethod->AddRef(); // festhalten, bis Event abgearbeitet. - Application::PostUserEvent( LINK( IDE_DLL()->GetExtraData(), BasicIDEData, ExecuteMacroEvent ), pMethod ); + MacroExecutionData* pExecData = new MacroExecutionData; + pExecData->aDocument = aDocument; + pExecData->xMethod = pMethod; // keep alive until the event has been processed + Application::PostUserEvent( STATIC_LINK( NULL, MacroExecution, ExecuteMacroEvent ), pExecData ); } } break; } - delete pChooser; - - SFX_APP()->LeaveBasicCall(); - - return ::rtl::OUString( aScriptURL ); + return aScriptURL; } //---------------------------------------------------------------------------- diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index 88586d950..c6ad7fac7 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -260,7 +260,7 @@ Window* __EXPORT IDEBaseWindow::GetLayoutWindow() return this; } -SfxUndoManager* __EXPORT IDEBaseWindow::GetUndoManager() +::svl::IUndoManager* __EXPORT IDEBaseWindow::GetUndoManager() { return NULL; } diff --git a/basctl/source/basicide/iderdll.cxx b/basctl/source/basicide/iderdll.cxx index 4f8c4c5ca..92662ca25 100644 --- a/basctl/source/basicide/iderdll.cxx +++ b/basctl/source/basicide/iderdll.cxx @@ -211,20 +211,3 @@ IMPL_LINK( BasicIDEData, GlobalBasicBreakHdl, StarBASIC *, pBasic ) return nRet; } - -IMPL_LINK( BasicIDEData, ExecuteMacroEvent, void *, pData ) -{ - if ( pData ) - { - SFX_APP()->EnterBasicCall(); - SbMethod* pMethod = (SbMethod*)pData; - - // Ist es eine StarScript-Methode? Am Parent erkennen - DBG_ASSERT( pMethod->GetParent()->GetFlags() & SBX_EXTSEARCH, "Kein EXTSEARCH!" ); - BasicIDE::RunMethod( pMethod ); - pMethod->ReleaseRef(); // muss vorher inkrementiert worden sein! - SFX_APP()->LeaveBasicCall(); - } - return 0; -} - diff --git a/basctl/source/basicide/iderdll2.hxx b/basctl/source/basicide/iderdll2.hxx index 55033b710..d6c25de04 100644 --- a/basctl/source/basicide/iderdll2.hxx +++ b/basctl/source/basicide/iderdll2.hxx @@ -100,8 +100,6 @@ public: const String& GetAddLibFilter() const { return aAddLibFilter; } void SetAddLibFilter( const String& rFilter ) { aAddLibFilter = rFilter; } - - DECL_LINK( ExecuteMacroEvent, void * ); }; diff --git a/basctl/source/inc/baside3.hxx b/basctl/source/inc/baside3.hxx index 3f35aa0b6..606b33d3e 100644 --- a/basctl/source/inc/baside3.hxx +++ b/basctl/source/inc/baside3.hxx @@ -106,7 +106,8 @@ public: virtual BOOL IsModified(); virtual BOOL IsPasteAllowed(); - virtual SfxUndoManager* GetUndoManager(); + virtual ::svl::IUndoManager* + GetUndoManager(); // return number of pages to be printed virtual sal_Int32 countPages( Printer* pPrinter ); // print page diff --git a/basctl/source/inc/basidesh.hxx b/basctl/source/inc/basidesh.hxx index 56ce8e4d6..d983f93bf 100644 --- a/basctl/source/inc/basidesh.hxx +++ b/basctl/source/inc/basidesh.hxx @@ -197,7 +197,8 @@ public: SdrView* GetCurDlgView() const; - SfxUndoManager* GetUndoManager(); + ::svl::IUndoManager* + GetUndoManager(); virtual com::sun::star::uno::Reference< com::sun::star::view::XRenderable > GetRenderable(); diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx index 034a46010..f4b4ce6d7 100644 --- a/basctl/source/inc/bastypes.hxx +++ b/basctl/source/inc/bastypes.hxx @@ -164,9 +164,13 @@ public: #define BASWIN_INRESCHEDULE 0x08 class Printer; -class SfxUndoManager; class BasicEntryDescriptor; +namespace svl +{ + class IUndoManager; +} + class IDEBaseWindow : public Window { private: @@ -228,7 +232,8 @@ public: virtual Window* GetLayoutWindow(); - virtual SfxUndoManager* GetUndoManager(); + virtual ::svl::IUndoManager* + GetUndoManager(); virtual USHORT GetSearchOptions(); diff --git a/basctl/util/makefile.mk b/basctl/util/makefile.mk index e690a5a20..1719a7c9c 100644 --- a/basctl/util/makefile.mk +++ b/basctl/util/makefile.mk @@ -54,6 +54,7 @@ SHL1STDLIBS= \ $(SVXCORELIB) \ $(SVXLIB) \ $(SFX2LIB) \ + $(FWELIB) \ $(BASICLIB) \ $(SVTOOLLIB) \ $(TKLIB) \ diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index 3dd06df71..73ffe01cf 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -36,7 +36,6 @@ #include <dialmgr.hxx> #include <sfx2/msg.hxx> -#include <sfx2/macrconf.hxx> #include <sfx2/app.hxx> #include <sfx2/filedlghelper.hxx> #include <sfx2/minfitem.hxx> @@ -1442,9 +1441,6 @@ void SfxAcceleratorConfigPage::Reset( const SfxItemSet& rSet ) const SfxPoolItem* pFontItem=0; if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_SPECIALCHAR, TRUE, &pFontItem ) ) m_pFontItem = PTR_CAST( SfxStringItem, pFontItem ); - - if ( m_pStringItem ) - pGroupLBox->AddAndSelect( m_pStringItem, m_pFontItem ); } } diff --git a/cui/source/customize/acccfg.hrc b/cui/source/customize/acccfg.hrc index 483d3ddb5..efd0a5be6 100644 --- a/cui/source/customize/acccfg.hrc +++ b/cui/source/customize/acccfg.hrc @@ -63,7 +63,7 @@ #define STR_PDF_EXPORT_SEND 59 #define STR_RECHECK_DOCUMENT 60 #define IMG_INFO 61 -#define STR_BASICNAME 62 + // FREE #define BMP_COLLAPSED 63 #define BMP_EXPANDED 64 #define BMP_COLLAPSED_HC 65 diff --git a/cui/source/customize/acccfg.src b/cui/source/customize/acccfg.src index c585377b2..510d67c06 100644 --- a/cui/source/customize/acccfg.src +++ b/cui/source/customize/acccfg.src @@ -271,10 +271,6 @@ Resource RID_SVXPAGE_CONFIGGROUPBOX ImageBitmap = Bitmap { File = "imh30826.png"; }; MASKCOLOR }; - String STR_BASICNAME - { - Text = "%PRODUCTNAME Basic" ; - }; Image BMP_COLLAPSED { ImageBitmap = Bitmap diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 22d7554d9..cc3a3752b 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -54,7 +54,6 @@ #include <sfx2/msg.hxx> #include <sfx2/msgpool.hxx> #include <sfx2/mnumgr.hxx> -#include <sfx2/macrconf.hxx> #include <sfx2/minfitem.hxx> #include <sfx2/objsh.hxx> #include <sfx2/request.hxx> diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx index 42f074206..eaf1f441a 100644 --- a/cui/source/customize/cfgutil.cxx +++ b/cui/source/customize/cfgutil.cxx @@ -59,7 +59,6 @@ #include <tools/urlobj.hxx> #include "cuires.hrc" #include <sfx2/app.hxx> -#include <sfx2/macrconf.hxx> #include <sfx2/minfitem.hxx> #include <unotools/processfactory.hxx> #include <comphelper/documentinfo.hxx> @@ -350,16 +349,13 @@ void SfxConfigFunctionListBox_Impl::ClearAll() { SfxGroupInfo_Impl *pData = aArr[i]; - if ( pData->nKind == SFX_CFGFUNCTION_MACRO || - pData->nKind == SFX_CFGFUNCTION_SCRIPT ) + if ( pData->nKind == SFX_CFGFUNCTION_SCRIPT ) { - SfxMacroInfo *pInfo = (SfxMacroInfo*) pData->pObject; - SFX_APP()->GetMacroConfig()->ReleaseSlotId( pInfo->GetSlotId() ); - delete pInfo; + String* pScriptURI = (String*)pData->pObject; + delete pScriptURI; } if ( pData->nKind == SFX_CFGGROUP_SCRIPTCONTAINER - || pData->nKind == SFX_CFGGROUP_DOCBASICMGR ) { XInterface* xi = static_cast<XInterface *>(pData->pObject); @@ -376,21 +372,16 @@ void SfxConfigFunctionListBox_Impl::ClearAll() Clear(); } -SfxMacroInfo* SfxConfigFunctionListBox_Impl::GetMacroInfo() -/* Beschreibung - Gibt die MacroInfo des selektierten Entry zur"uck ( sofern vorhanden ). -*/ +String SfxConfigFunctionListBox_Impl::GetSelectedScriptURI() { SvLBoxEntry *pEntry = FirstSelected(); if ( pEntry ) { SfxGroupInfo_Impl *pData = (SfxGroupInfo_Impl*) pEntry->GetUserData(); - if ( pData && ( pData->nKind == SFX_CFGFUNCTION_MACRO || - pData->nKind == SFX_CFGFUNCTION_SCRIPT ) ) - return (SfxMacroInfo*) pData->pObject; + if ( pData && ( pData->nKind == SFX_CFGFUNCTION_SCRIPT ) ) + return *(String*)pData->pObject; } - - return 0; + return String(); } String SfxConfigFunctionListBox_Impl::GetCurCommand() @@ -449,7 +440,6 @@ struct SvxConfigGroupBoxResource_Impl : public Resource String m_sDlgMacros; String m_aHumanAppName; String m_aStrGroupStyles; - String m_aScriptType; Image m_collapsedImage; Image m_collapsedImage_hc; Image m_expandedImage; @@ -474,7 +464,6 @@ SvxConfigGroupBoxResource_Impl::SvxConfigGroupBoxResource_Impl() : m_sDlgMacros(String(CUI_RES(STR_DLG_MACROS))), m_aHumanAppName(String(CUI_RES(STR_HUMAN_APPNAME))), m_aStrGroupStyles(String(CUI_RES(STR_GROUP_STYLES))), - m_aScriptType(String(CUI_RES(STR_BASICNAME))), m_collapsedImage(CUI_RES(BMP_COLLAPSED)), m_collapsedImage_hc(CUI_RES(BMP_COLLAPSED_HC)), m_expandedImage(CUI_RES(BMP_EXPANDED)), @@ -486,42 +475,11 @@ SvxConfigGroupBoxResource_Impl::SvxConfigGroupBoxResource_Impl() : SfxConfigGroupListBox_Impl::SfxConfigGroupListBox_Impl( Window* pParent, const ResId& rResId, ULONG nConfigMode ) : SvTreeListBox( pParent, rResId ) - , pImp(new SvxConfigGroupBoxResource_Impl()), pFunctionListBox(0), nMode( nConfigMode ), bShowSF( FALSE ), bShowBasic( TRUE ), pStylesInfo(0) + , pImp(new SvxConfigGroupBoxResource_Impl()), pFunctionListBox(0), nMode( nConfigMode ), pStylesInfo(0) { SetStyle( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_HASBUTTONS | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONSATROOT ); SetNodeBitmaps( pImp->m_collapsedImage, pImp->m_expandedImage, BMP_COLOR_NORMAL ); SetNodeBitmaps( pImp->m_collapsedImage_hc, pImp->m_expandedImage_hc, BMP_COLOR_HIGHCONTRAST ); - - // Check configuration to see whether only Basic macros, - // only Scripting Framework scripts, or both should be listed - Any value; - sal_Bool tmp = false; - - value = ::utl::ConfigManager::GetConfigManager()->GetLocalProperty( - ::rtl::OUString::createFromAscii( - "Office.Scripting/ScriptDisplaySettings/ShowBasic" ) ); - - value >>= tmp; - - if (tmp == sal_True) { - bShowBasic = TRUE; - } - else { - bShowBasic = FALSE; - } - - value = ::utl::ConfigManager::GetConfigManager()->GetLocalProperty( - ::rtl::OUString::createFromAscii( - "Office.Scripting/ScriptDisplaySettings/ShowSF" ) ); - - value >>= tmp; - - if (tmp == sal_True) { - bShowSF = TRUE; - } - else { - bShowSF = FALSE; - } } @@ -537,7 +495,6 @@ void SfxConfigGroupListBox_Impl::ClearAll() { SfxGroupInfo_Impl *pData = aArr[i]; if ( pData->nKind == SFX_CFGGROUP_SCRIPTCONTAINER - || pData->nKind == SFX_CFGGROUP_DOCBASICMGR ) { XInterface* xi = static_cast<XInterface *>(pData->pObject); @@ -553,31 +510,6 @@ void SfxConfigGroupListBox_Impl::ClearAll() Clear(); } -void SfxConfigGroupListBox_Impl::SetScriptType( const String& rScriptType ) -{ - pImp->m_aScriptType = rScriptType; - ULONG nPos=0; - SvLBoxEntry *pEntry = (SvLBoxEntry*) GetModel()->GetEntryAtAbsPos( nPos++ ); - while ( pEntry ) - { - SfxGroupInfo_Impl *pInfo = (SfxGroupInfo_Impl*) pEntry->GetUserData(); - if ( pInfo->nKind == SFX_CFGGROUP_BASICLIB && ( IsExpanded( pEntry ) || pInfo->bWasOpened ) ) - { - Collapse( pEntry ); - SvLBoxEntry *pChild = FirstChild( pEntry ); - while (pChild) - { - GetModel()->Remove( pChild ); - pChild = FirstChild( pEntry ); - } - - Expand( pEntry ); - } - - pEntry = (SvLBoxEntry*) GetModel()->GetEntryAtAbsPos( nPos++ ); - } -} - void SfxConfigGroupListBox_Impl::SetStylesInfo(SfxStylesInfo_Impl* pStyles) { pStylesInfo = pStyles; @@ -596,18 +528,6 @@ String SfxConfigGroupListBox_Impl::GetGroup() if ( pInfo->nKind == SFX_CFGGROUP_FUNCTION ) return GetEntryText( pEntry ); - if ( pInfo->nKind == SFX_CFGGROUP_BASICMGR ) - { - BasicManager *pMgr = (BasicManager*) pInfo->pObject; - return pMgr->GetName(); - } - - if ( pInfo->nKind == SFX_CFGGROUP_DOCBASICMGR ) - { - Reference< XModel > xDoc( static_cast< XModel* >( pInfo->pObject ) ); - return ::comphelper::DocumentInfo::getDocumentTitle( xDoc ); - } - pEntry = GetParent( pEntry ); } @@ -615,27 +535,6 @@ String SfxConfigGroupListBox_Impl::GetGroup() } //----------------------------------------------- -BasicManager* SfxConfigGroupListBox_Impl::GetBasicManager( const SvLBoxEntry& _rEntry ) -{ - BasicManager* pBasMgr = NULL; - - SfxGroupInfo_Impl* pInfo = (SfxGroupInfo_Impl*) _rEntry.GetUserData(); - switch ( pInfo->nKind ) - { - case SFX_CFGGROUP_BASICMGR : - pBasMgr = (BasicManager*) pInfo->pObject; - break; - case SFX_CFGGROUP_DOCBASICMGR : - { - Reference< XModel > xDoc( static_cast< XModel* >( pInfo->pObject ) ); - pBasMgr = ::basic::BasicManagerRepository::getDocumentBasicManager( xDoc ); - } - break; - } - return pBasMgr; -} - -//----------------------------------------------- void SfxConfigGroupListBox_Impl::InitModule() { try @@ -758,253 +657,144 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMul InitStyles(); } - /* - - // Verwendet wird der aktuelle Slotpool - if ( nMode ) + OSL_TRACE("** ** About to initialise SF Scripts"); + // Add Scripting Framework entries + Reference< browse::XBrowseNode > rootNode; + Reference< XComponentContext > xCtx; + try { - pSlotPool = pPool ? pPool : &SFX_SLOTPOOL(); - for ( USHORT i=1; i<pSlotPool->GetGroupCount(); i++ ) - { - // Gruppe anw"ahlen ( Gruppe 0 ist intern ) - String aName = pSlotPool->SeekGroup( i ); - const SfxSlot *pSfxSlot = pSlotPool->FirstSlot(); - if ( pSfxSlot ) - { - // Check if all entries are not useable. Don't - // insert a group without any useable function. - sal_Bool bActiveEntries = sal_False; - while ( pSfxSlot ) - { - USHORT nId = pSfxSlot->GetSlotId(); - if ( pSfxSlot->GetMode() & nMode ) - { - bActiveEntries = sal_True; - break; - } - - pSfxSlot = pSlotPool->NextSlot(); - } - - if ( bActiveEntries ) - { - // Wenn Gruppe nicht leer - SvLBoxEntry *pEntry = InsertEntry( aName, NULL ); - SfxGroupInfo_Impl *pInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_FUNCTION, i ); - aArr.Insert( pInfo, aArr.Count() ); - pEntry->SetUserData( pInfo ); - } - } - } + Reference < beans::XPropertySet > xProps( + ::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW ); + xCtx.set( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))), UNO_QUERY_THROW ); + Reference< browse::XBrowseNodeFactory > xFac( xCtx->getValueByName( + ::rtl::OUString::createFromAscii( "/singletons/com.sun.star.script.browse.theBrowseNodeFactory") ), UNO_QUERY_THROW ); + rootNode.set( xFac->createView( browse::BrowseNodeFactoryViewTypes::MACROSELECTOR ) ); + //rootNode.set( xFac->createView( browse::BrowseNodeFactoryViewTypes::MACROORGANIZER ) ); } -*/ - SfxApplication *pSfxApp = SFX_APP(); - if ( bShowBasic ) + catch( Exception& e ) { - // Basics einsammeln - pSfxApp->EnterBasicCall(); - String aMacroName(' '); - aMacroName += pImp->m_sDlgMacros; - - // Zuerst AppBasic - BasicManager *pAppBasicMgr = pSfxApp->GetBasicManager(); - BOOL bInsert = TRUE; - /* - if ( pArr ) - { - bInsert = FALSE; - for ( USHORT n=0; n<pArr->Count(); n++ ) - { - if ( *(*pArr)[n] == pSfxApp->GetName() ) - { - bInsert = TRUE; - break; - } - } - } - */ - - if ( bInsert ) - { - pAppBasicMgr->SetName( pSfxApp->GetName() ); - if ( pAppBasicMgr->GetLibCount() ) - { - // Nur einf"ugen, wenn Bibliotheken vorhanden - String aAppBasTitle( pImp->m_aHumanAppName ); - aAppBasTitle += aMacroName; - SvLBoxEntry *pEntry = InsertEntry( aAppBasTitle, 0 ); - SfxGroupInfo_Impl *pInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_BASICMGR, 0, pAppBasicMgr ); - // aArr.Insert( pInfo, aArr.Count() ); - pEntry->SetUserData( pInfo ); - pEntry->EnableChildsOnDemand( TRUE ); - // Expand( pEntry ); - } - } - - Reference< XModel > xDoc( lcl_getScriptableDocument_nothrow( m_xFrame ) ); - if ( xDoc.is() ) - { - BasicManager* pBasicMgr = ::basic::BasicManagerRepository::getDocumentBasicManager( xDoc ); - if ( pBasicMgr != pAppBasicMgr && pBasicMgr->GetLibCount() ) - { - String sDocTitle( ::comphelper::DocumentInfo::getDocumentTitle( xDoc ) ); - pBasicMgr->SetName( sDocTitle ); - - // Nur einf"ugen, wenn eigenes Basic mit Bibliotheken - SvLBoxEntry *pEntry = InsertEntry( sDocTitle.Append( aMacroName ), NULL ); - xDoc->acquire(); - SfxGroupInfo_Impl *pInfo = - new SfxGroupInfo_Impl( SFX_CFGGROUP_DOCBASICMGR, 0, xDoc.get() ); - pEntry->SetUserData( pInfo ); - pEntry->EnableChildsOnDemand( TRUE ); - } - } - - pSfxApp->LeaveBasicCall(); + OSL_TRACE(" Caught some exception whilst retrieving browse nodes from factory... Exception: %s", + ::rtl::OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).pData->buffer ); + // TODO exception handling } - OSL_TRACE("** ** About to initialise SF Scripts"); - if ( bShowSF ) + + if ( rootNode.is() ) { - OSL_TRACE("** ** bShowSF"); - // Add Scripting Framework entries - Reference< browse::XBrowseNode > rootNode; - Reference< XComponentContext > xCtx; - try + if ( nMode ) { - Reference < beans::XPropertySet > xProps( - ::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW ); - xCtx.set( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))), UNO_QUERY_THROW ); - Reference< browse::XBrowseNodeFactory > xFac( xCtx->getValueByName( - ::rtl::OUString::createFromAscii( "/singletons/com.sun.star.script.browse.theBrowseNodeFactory") ), UNO_QUERY_THROW ); - rootNode.set( xFac->createView( browse::BrowseNodeFactoryViewTypes::MACROSELECTOR ) ); - //rootNode.set( xFac->createView( browse::BrowseNodeFactoryViewTypes::MACROORGANIZER ) ); + //We call acquire on the XBrowseNode so that it does not + //get autodestructed and become invalid when accessed later. + rootNode->acquire(); + + SfxGroupInfo_Impl *pInfo = + new SfxGroupInfo_Impl( SFX_CFGGROUP_SCRIPTCONTAINER, 0, + static_cast<void *>(rootNode.get())); + + String aTitle(pImp->m_sDlgMacros); + SvLBoxEntry *pNewEntry = InsertEntry( aTitle, NULL ); + pNewEntry->SetUserData( pInfo ); + pNewEntry->EnableChildsOnDemand( TRUE ); + aArr.Insert( pInfo, aArr.Count() ); } - catch( Exception& e ) + else { - OSL_TRACE(" Caught some exception whilst retrieving browse nodes from factory... Exception: %s", - ::rtl::OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).pData->buffer ); - // TODO exception handling - } - + //We are only showing scripts not slot APIs so skip + //Root node and show location nodes + try { + if ( rootNode->hasChildNodes() ) + { + Sequence< Reference< browse::XBrowseNode > > children = + rootNode->getChildNodes(); + BOOL bIsRootNode = FALSE; - if ( rootNode.is() ) - { - if ( nMode ) - { - //We call acquire on the XBrowseNode so that it does not - //get autodestructed and become invalid when accessed later. - rootNode->acquire(); - - SfxGroupInfo_Impl *pInfo = - new SfxGroupInfo_Impl( SFX_CFGGROUP_SCRIPTCONTAINER, 0, - static_cast<void *>(rootNode.get())); - - String aTitle(pImp->m_sDlgMacros); - SvLBoxEntry *pNewEntry = InsertEntry( aTitle, NULL ); - pNewEntry->SetUserData( pInfo ); - pNewEntry->EnableChildsOnDemand( TRUE ); - aArr.Insert( pInfo, aArr.Count() ); - } - else - { - //We are only showing scripts not slot APIs so skip - //Root node and show location nodes - try { - if ( rootNode->hasChildNodes() ) + ::rtl::OUString user = ::rtl::OUString::createFromAscii("user"); + ::rtl::OUString share = ::rtl::OUString::createFromAscii("share"); + if ( rootNode->getName().equals(::rtl::OUString::createFromAscii("Root") )) { - Sequence< Reference< browse::XBrowseNode > > children = - rootNode->getChildNodes(); - BOOL bIsRootNode = FALSE; - - ::rtl::OUString user = ::rtl::OUString::createFromAscii("user"); - ::rtl::OUString share = ::rtl::OUString::createFromAscii("share"); - if ( rootNode->getName().equals(::rtl::OUString::createFromAscii("Root") )) - { - bIsRootNode = TRUE; - } + bIsRootNode = TRUE; + } - //To mimic current starbasic behaviour we - //need to make sure that only the current document - //is displayed in the config tree. Tests below - //set the bDisplay flag to FALSE if the current - //node is a first level child of the Root and is NOT - //either the current document, user or share - ::rtl::OUString currentDocTitle; - Reference< XModel > xDocument( lcl_getScriptableDocument_nothrow( m_xFrame ) ); - if ( xDocument.is() ) - { - currentDocTitle = ::comphelper::DocumentInfo::getDocumentTitle( xDocument ); - } + //To mimic current starbasic behaviour we + //need to make sure that only the current document + //is displayed in the config tree. Tests below + //set the bDisplay flag to FALSE if the current + //node is a first level child of the Root and is NOT + //either the current document, user or share + ::rtl::OUString currentDocTitle; + Reference< XModel > xDocument( lcl_getScriptableDocument_nothrow( m_xFrame ) ); + if ( xDocument.is() ) + { + currentDocTitle = ::comphelper::DocumentInfo::getDocumentTitle( xDocument ); + } - for ( sal_Int32 n = 0; n < children.getLength(); n++ ) + for ( sal_Int32 n = 0; n < children.getLength(); n++ ) + { + Reference< browse::XBrowseNode >& theChild = children[n]; + BOOL bDisplay = TRUE; + ::rtl::OUString uiName = theChild->getName(); + if ( bIsRootNode ) { - Reference< browse::XBrowseNode >& theChild = children[n]; - BOOL bDisplay = TRUE; - ::rtl::OUString uiName = theChild->getName(); - if ( bIsRootNode ) + if ( ! ((theChild->getName().equals( user ) || theChild->getName().equals( share ) || + theChild->getName().equals( currentDocTitle ) ) ) ) + { + bDisplay=FALSE; + } + else { - if ( ! ((theChild->getName().equals( user ) || theChild->getName().equals( share ) || - theChild->getName().equals( currentDocTitle ) ) ) ) + if ( uiName.equals( user ) ) { - bDisplay=FALSE; + uiName = pImp->m_sMyMacros; } - else + else if ( uiName.equals( share ) ) { - if ( uiName.equals( user ) ) - { - uiName = pImp->m_sMyMacros; - } - else if ( uiName.equals( share ) ) - { - uiName = pImp->m_sProdMacros; - } + uiName = pImp->m_sProdMacros; } } - if (children[n]->getType() != browse::BrowseNodeTypes::SCRIPT && bDisplay ) - { + } + if (children[n]->getType() != browse::BrowseNodeTypes::SCRIPT && bDisplay ) + { // We call acquire on the XBrowseNode so that it does not // get autodestructed and become invalid when accessed later. - theChild->acquire(); + theChild->acquire(); - SfxGroupInfo_Impl* pInfo = - new SfxGroupInfo_Impl(SFX_CFGGROUP_SCRIPTCONTAINER, - 0, static_cast<void *>( theChild.get())); + SfxGroupInfo_Impl* pInfo = + new SfxGroupInfo_Impl(SFX_CFGGROUP_SCRIPTCONTAINER, + 0, static_cast<void *>( theChild.get())); - Image aImage = GetImage( theChild, xCtx, bIsRootNode,BMP_COLOR_NORMAL ); - SvLBoxEntry* pNewEntry = - InsertEntry( uiName, NULL); - SetExpandedEntryBmp(pNewEntry, aImage, BMP_COLOR_NORMAL); - SetCollapsedEntryBmp(pNewEntry, aImage, BMP_COLOR_NORMAL); - aImage = GetImage( theChild, xCtx, bIsRootNode,BMP_COLOR_HIGHCONTRAST ); - SetExpandedEntryBmp(pNewEntry, aImage, BMP_COLOR_HIGHCONTRAST); - SetCollapsedEntryBmp(pNewEntry, aImage, BMP_COLOR_HIGHCONTRAST); + Image aImage = GetImage( theChild, xCtx, bIsRootNode,BMP_COLOR_NORMAL ); + SvLBoxEntry* pNewEntry = + InsertEntry( uiName, NULL); + SetExpandedEntryBmp(pNewEntry, aImage, BMP_COLOR_NORMAL); + SetCollapsedEntryBmp(pNewEntry, aImage, BMP_COLOR_NORMAL); + aImage = GetImage( theChild, xCtx, bIsRootNode,BMP_COLOR_HIGHCONTRAST ); + SetExpandedEntryBmp(pNewEntry, aImage, BMP_COLOR_HIGHCONTRAST); + SetCollapsedEntryBmp(pNewEntry, aImage, BMP_COLOR_HIGHCONTRAST); - pNewEntry->SetUserData( pInfo ); - aArr.Insert( pInfo, aArr.Count() ); + pNewEntry->SetUserData( pInfo ); + aArr.Insert( pInfo, aArr.Count() ); - if ( children[n]->hasChildNodes() ) - { - Sequence< Reference< browse::XBrowseNode > > grandchildren = - children[n]->getChildNodes(); + if ( children[n]->hasChildNodes() ) + { + Sequence< Reference< browse::XBrowseNode > > grandchildren = + children[n]->getChildNodes(); - for ( sal_Int32 m = 0; m < grandchildren.getLength(); m++ ) + for ( sal_Int32 m = 0; m < grandchildren.getLength(); m++ ) + { + if ( grandchildren[m]->getType() == browse::BrowseNodeTypes::CONTAINER ) { - if ( grandchildren[m]->getType() == browse::BrowseNodeTypes::CONTAINER ) - { - pNewEntry->EnableChildsOnDemand( TRUE ); - m = grandchildren.getLength(); - } + pNewEntry->EnableChildsOnDemand( TRUE ); + m = grandchildren.getLength(); } } } } } } - catch (RuntimeException&) { - // do nothing, the entry will not be displayed in the UI - } + } + catch (RuntimeException&) { + // do nothing, the entry will not be displayed in the UI } } } @@ -1020,14 +810,6 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMul pEntry->EnableChildsOnDemand( TRUE ); } -/* { - String sSymbols( String::CreateFromAscii("Symbols") ); - SvLBoxEntry *pEntry = InsertEntry( sSymbols, 0 ); - SfxGroupInfo_Impl *pInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_SPECIALCHARACTERS, 0, 0 ); // TODO last parameter should contain user data - aArr.Insert( pInfo, aArr.Count() ); - pEntry->SetUserData( pInfo ); - } */ - MakeVisible( GetEntry( 0,0 ) ); SetUpdateMode( TRUE ); } @@ -1208,7 +990,6 @@ void SfxConfigGroupListBox_Impl::GroupSelected() pFunctionListBox->SetUpdateMode(FALSE); pFunctionListBox->ClearAll(); if ( pInfo->nKind != SFX_CFGGROUP_FUNCTION && - pInfo->nKind != SFX_CFGGROUP_BASICMOD && pInfo->nKind != SFX_CFGGROUP_SCRIPTCONTAINER && pInfo->nKind != SFX_CFGGROUP_STYLES ) { @@ -1220,7 +1001,7 @@ void SfxConfigGroupListBox_Impl::GroupSelected() { case SFX_CFGGROUP_FUNCTION : { - USHORT nGroup = pInfo->nOrd; + USHORT nGroup = pInfo->nUniqueID; css::uno::Reference< css::frame::XDispatchInformationProvider > xProvider (m_xFrame, css::uno::UNO_QUERY_THROW); css::uno::Sequence< css::frame::DispatchInformation > lCommands = xProvider->getConfigurableDispatchInformation(nGroup); sal_Int32 c = lCommands.getLength(); @@ -1240,45 +1021,6 @@ void SfxConfigGroupListBox_Impl::GroupSelected() break; } - case SFX_CFGGROUP_BASICMOD : - { - SvLBoxEntry *pLibEntry = GetParent( pEntry ); - SfxGroupInfo_Impl *pLibInfo = - (SfxGroupInfo_Impl*) pLibEntry->GetUserData(); - SvLBoxEntry *pBasEntry = GetParent( pLibEntry ); - SfxGroupInfo_Impl *pBasInfo = - (SfxGroupInfo_Impl*) pBasEntry->GetUserData(); - - StarBASIC *pLib = (StarBASIC*) pLibInfo->pObject; - Reference< XModel > xDoc; - if ( pBasInfo->nKind == SFX_CFGGROUP_DOCBASICMGR ) - xDoc = static_cast< XModel* >( pBasInfo->pObject ); - - SbModule *pMod = (SbModule*) pInfo->pObject; - for ( USHORT nMeth=0; nMeth < pMod->GetMethods()->Count(); nMeth++ ) - { - SbxMethod *pMeth = (SbxMethod*)pMod->GetMethods()->Get(nMeth); - SfxMacroInfoPtr pInf = new SfxMacroInfo( !xDoc.is(), - pLib->GetName(), - pMod->GetName(), - pMeth->GetName()); - if ( pMeth->GetInfo() ) - pInf->SetHelpText( pMeth->GetInfo()->GetComment() ); - USHORT nId = SFX_APP()->GetMacroConfig()->GetSlotId( pInf ); - if ( !nId ) - break; // Kein Slot mehr frei - - SvLBoxEntry* pFuncEntry = - pFunctionListBox->InsertEntry( pMeth->GetName(), NULL ); - SfxGroupInfo_Impl *pGrpInfo = - new SfxGroupInfo_Impl( SFX_CFGFUNCTION_MACRO, nId, pInf ); - pFunctionListBox->aArr.Insert( pGrpInfo, pFunctionListBox->aArr.Count() ); - pFuncEntry->SetUserData( pGrpInfo ); - } - - break; - } - case SFX_CFGGROUP_SCRIPTCONTAINER: { if ( !GetChildCount( pEntry ) ) @@ -1308,13 +1050,8 @@ void SfxConfigGroupListBox_Impl::GroupSelected() xPropSet->getPropertyValue( String::CreateFromAscii( "URI" ) ); value >>= uri; - SfxMacroInfo* aInfo = new SfxMacroInfo( (String)uri ); - aInfo->SetHelpText( uri ); - SFX_APP()->GetMacroConfig()->GetSlotId( aInfo ); - - SfxGroupInfo_Impl* pGrpInfo = - new SfxGroupInfo_Impl(SFX_CFGFUNCTION_SCRIPT, - aInfo->GetSlotId(), aInfo); + String* pScriptURI = new String( uri ); + SfxGroupInfo_Impl* pGrpInfo = new SfxGroupInfo_Impl( SFX_CFGFUNCTION_SCRIPT, 0, pScriptURI ); Image aImage = GetImage( children[n], Reference< XComponentContext >(), sal_False, BMP_COLOR_NORMAL ); SvLBoxEntry* pNewEntry = @@ -1422,66 +1159,6 @@ void SfxConfigGroupListBox_Impl::RequestingChilds( SvLBoxEntry *pEntry ) pInfo->bWasOpened = TRUE; switch ( pInfo->nKind ) { - case SFX_CFGGROUP_BASICMGR : - case SFX_CFGGROUP_DOCBASICMGR : - { - if ( !GetChildCount( pEntry ) ) - { - // Erstmaliges "Offnen - BasicManager* pMgr( GetBasicManager( *pEntry ) ); - - SvLBoxEntry *pLibEntry = 0; - for ( USHORT nLib=0; nLib<pMgr->GetLibCount(); nLib++) - { - StarBASIC* pLib = pMgr->GetLib( nLib ); - pLibEntry = InsertEntry( pMgr->GetLibName( nLib ), pEntry ); - SfxGroupInfo_Impl *pGrpInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_BASICLIB, nLib, pLib ); - aArr.Insert( pGrpInfo, aArr.Count() ); - pLibEntry->SetUserData( pGrpInfo ); - pLibEntry->EnableChildsOnDemand( TRUE ); - } - } - - break; - } - - case SFX_CFGGROUP_BASICLIB : - { - if ( !GetChildCount( pEntry ) ) - { - // Erstmaliges "Offnen - StarBASIC *pLib = (StarBASIC*) pInfo->pObject; - if ( !pLib ) - { - // Lib mu\s nachgeladen werden - SvLBoxEntry *pParent = GetParent( pEntry ); - BasicManager *pMgr( GetBasicManager( *pParent ) ); - - if ( pMgr->LoadLib( pInfo->nOrd ) ) - pInfo->pObject = pLib = pMgr->GetLib( pInfo->nOrd ); - else - break; - } - - SvLBoxEntry *pModEntry = 0; - for ( USHORT nMod=0; nMod<pLib->GetModules()->Count(); nMod++ ) - { - SbModule* pMod = (SbModule*)pLib->GetModules()->Get( nMod ); - - BOOL bIsStarScript = FALSE; //pMod->ISA( SbJScriptModule ); - BOOL bWantsStarScript = pImp->m_aScriptType.EqualsAscii("StarScript"); - if ( bIsStarScript != bWantsStarScript ) - continue; - pModEntry = InsertEntry( pMod->GetName(), pEntry ); - SfxGroupInfo_Impl *pGrpInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_BASICMOD, 0, pMod ); - aArr.Insert( pGrpInfo, aArr.Count() ); - pModEntry->SetUserData( pGrpInfo ); - } - } - - break; - } - case SFX_CFGGROUP_SCRIPTCONTAINER: { if ( !GetChildCount( pEntry ) ) @@ -1604,25 +1281,6 @@ void SfxConfigGroupListBox_Impl::RequestingChilds( SvLBoxEntry *pEntry ) } } -void SfxConfigGroupListBox_Impl::AddAndSelect( const SfxStringItem* , const SfxStringItem* ) -{ - /* - if ( pText ) - { - Select( GetEntry( GetEntryCount()-1) ); - SvLBoxEntry* pFuncEntry = pFunctionListBox->InsertEntry( pText->GetValue(), NULL ); - SfxGroupInfo_Impl *pGrpInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_SPECIALCHARACTERS, 0, 0 ); - String aCommand = String::CreateFromAscii(".uno:InsertSymbol?Symbols:string="); - aCommand += pText->GetValue(); - pFunctionListBox->aArr.Insert( pGrpInfo, pFunctionListBox->aArr.Count() ); - pGrpInfo->sCommand = aCommand; - pGrpInfo->sLabel = String::CreateFromAscii("Symbols: "); - pGrpInfo->sLabel += pText->GetValue(); - pFuncEntry->SetUserData( pGrpInfo ); - } - */ -} - void SfxConfigGroupListBox_Impl::SelectMacro( const SfxMacroInfoItem *pItem ) { SelectMacro( pItem->GetBasicManager()->GetName(), diff --git a/cui/source/customize/eventdlg.cxx b/cui/source/customize/eventdlg.cxx index a002b3b07..19a44a497 100644 --- a/cui/source/customize/eventdlg.cxx +++ b/cui/source/customize/eventdlg.cxx @@ -43,7 +43,6 @@ #include <sfx2/viewfrm.hxx> #include <sfx2/evntconf.hxx> -#include <sfx2/macrconf.hxx> #include <sfx2/minfitem.hxx> #include <sfx2/app.hxx> #include <sfx2/objsh.hxx> diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx index cc1f7e3b9..b684bad8f 100644 --- a/cui/source/customize/macropg.cxx +++ b/cui/source/customize/macropg.cxx @@ -38,7 +38,6 @@ #include <tools/diagnose_ex.h> #include <sfx2/app.hxx> #include <sfx2/objsh.hxx> -#include <sfx2/macrconf.hxx> #include <sfx2/sfxdefs.hxx> #include <com/sun/star/container/NoSuchElementException.hpp> #include <com/sun/star/lang/IllegalArgumentException.hpp> @@ -212,7 +211,7 @@ void _HeaderTabListBox::Enable( bool bEnable, bool bChild ) // assign button ("Add Command") is enabled only if it is not read only // delete button ("Remove Command") is enabled if a current binding exists // and it is not read only -void _SvxMacroTabPage::EnableButtons( const String& /*rLangName*/ ) +void _SvxMacroTabPage::EnableButtons() { const SvLBoxEntry* pE = mpImpl->pEventLB->GetListBox().FirstSelected(); if ( pE ) @@ -592,7 +591,7 @@ void _SvxMacroTabPage::DisplayAppEvents( bool appEvents) } rListBox.SetUpdateMode( TRUE ); - EnableButtons( String() ); + EnableButtons(); } // select event handler on the listbox @@ -610,7 +609,7 @@ IMPL_STATIC_LINK( _SvxMacroTabPage, SelectEvent_Impl, SvTabListBox*, EMPTYARG ) return 0; } - pThis->EnableButtons( String() ); + pThis->EnableButtons(); return 0; } @@ -736,7 +735,7 @@ long _SvxMacroTabPage::GenericHandler_Impl( _SvxMacroTabPage* pThis, PushButton* rListBox.MakeVisible( pE ); rListBox.SetUpdateMode( TRUE ); - pThis->EnableButtons( String() ); + pThis->EnableButtons(); return 0; } diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx index 70278761c..0e535cc61 100644 --- a/cui/source/customize/selector.cxx +++ b/cui/source/customize/selector.cxx @@ -39,7 +39,6 @@ #include <sfx2/app.hxx> #include <sfx2/msg.hxx> #include <sfx2/msgpool.hxx> -#include <sfx2/macrconf.hxx> #include <sfx2/minfitem.hxx> #include <sfx2/objsh.hxx> #include <sfx2/dispatch.hxx> diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index a6c628885..4e2df61e8 100755 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -88,14 +88,16 @@ struct SpellDialog_Impl // ----------------------------------------------------------------------- //#define VENDOR_IMAGE_HEIGHT 44 //as specified -#define SPELLUNDO_CHANGE_LANGUAGE (TEXTUNDO_USER + 1) -#define SPELLUNDO_CHANGE_TEXTENGINE (TEXTUNDO_USER + 2) -#define SPELLUNDO_CHANGE_NEXTERROR (TEXTUNDO_USER + 3) -#define SPELLUNDO_CHANGE_ADD_TO_DICTIONARY (TEXTUNDO_USER + 4) -#define SPELLUNDO_CHANGE_GROUP (TEXTUNDO_USER + 5) //undo list -#define SPELLUNDO_MOVE_ERROREND (TEXTUNDO_USER + 6) -#define SPELLUNDO_UNDO_EDIT_MODE (TEXTUNDO_USER + 7) -#define SPELLUNDO_ADD_IGNORE_RULE (TEXTUNDO_USER + 8) +#define SPELLUNDO_START 200 + +#define SPELLUNDO_CHANGE_LANGUAGE (SPELLUNDO_START + 1) +#define SPELLUNDO_CHANGE_TEXTENGINE (SPELLUNDO_START + 2) +#define SPELLUNDO_CHANGE_NEXTERROR (SPELLUNDO_START + 3) +#define SPELLUNDO_CHANGE_ADD_TO_DICTIONARY (SPELLUNDO_START + 4) +#define SPELLUNDO_CHANGE_GROUP (SPELLUNDO_START + 5) //undo list +#define SPELLUNDO_MOVE_ERROREND (SPELLUNDO_START + 6) +#define SPELLUNDO_UNDO_EDIT_MODE (SPELLUNDO_START + 7) +#define SPELLUNDO_ADD_IGNORE_RULE (SPELLUNDO_START + 8) namespace svx{ class SpellUndoAction_Impl : public SfxUndoAction @@ -628,7 +630,7 @@ IMPL_LINK( SpellDialog, ChangeHdl, Button *, EMPTYARG ) aSentenceED.ChangeMarkedWord(aString, GetSelectedLang_Impl()); SpellContinue_Impl(); bModified = false; - aSentenceED.UndoActionEnd( SPELLUNDO_CHANGE_GROUP ); + aSentenceED.UndoActionEnd(); } if(!aChangePB.IsEnabled()) aIgnorePB.GrabFocus(); @@ -670,7 +672,7 @@ IMPL_LINK( SpellDialog, ChangeAllHdl, Button *, EMPTYARG ) aSentenceED.ChangeMarkedWord(aString, eLang); SpellContinue_Impl(); bModified = false; - aSentenceED.UndoActionEnd( SPELLUNDO_CHANGE_GROUP ); + aSentenceED.UndoActionEnd(); return 1; } // ----------------------------------------------------------------------- @@ -715,7 +717,7 @@ IMPL_LINK( SpellDialog, IgnoreAllHdl, Button *, pButton ) SpellContinue_Impl(); bModified = false; - aSentenceED.UndoActionEnd( SPELLUNDO_CHANGE_GROUP ); + aSentenceED.UndoActionEnd(); return 1; } /*-- 06.11.2003 11:24:08--------------------------------------------------- @@ -1044,7 +1046,7 @@ IMPL_LINK(SpellDialog, AddToDictionaryHdl, MenuButton*, pButton ) // go on SpellContinue_Impl(); - aSentenceED.UndoActionEnd( SPELLUNDO_CHANGE_GROUP ); + aSentenceED.UndoActionEnd(); return 0; } /*------------------------------------------------------------------------- @@ -1755,7 +1757,7 @@ void SentenceEditWindow_Impl::ChangeMarkedWord(const String& rNewWord, LanguageT TextSelection aSel(TextPaM(0, m_nErrorStart), TextPaM(0, m_nErrorEnd)); //Remove spell errror attribute ExtTextEngine* pTextEngine = GetTextEngine(); - pTextEngine->UndoActionStart( TEXTUNDO_INSERT ); + pTextEngine->UndoActionStart(); const TextCharAttrib* pErrorAttrib = pTextEngine->FindCharAttrib( TextPaM(0, m_nErrorStart), TEXTATTR_SPELL_ERROR ); DBG_ASSERT(pErrorAttrib, "no error attribute found"); // Reference <XSpellAlternatives> xAlternatives; @@ -1808,7 +1810,7 @@ void SentenceEditWindow_Impl::ChangeMarkedWord(const String& rNewWord, LanguageT if(pSpellErrorDescription) SetAttrib( SpellErrorAttrib(*pSpellErrorDescription), 0, m_nErrorStart, m_nErrorEnd ); SetAttrib( SpellLanguageAttrib(eLanguage), 0, m_nErrorStart, m_nErrorEnd ); - pTextEngine->UndoActionEnd( TEXTUNDO_INSERT ); + pTextEngine->UndoActionEnd(); } /* -----------------08.10.2003 13:18----------------- @@ -2032,7 +2034,7 @@ svx::SpellPortions SentenceEditWindow_Impl::CreateSpellPortions( bool bSetIgnore -----------------------------------------------------------------------*/ void SentenceEditWindow_Impl::Undo() { - SfxUndoManager& rUndoMgr = GetTextEngine()->GetUndoManager(); + ::svl::IUndoManager& rUndoMgr = GetTextEngine()->GetUndoManager(); DBG_ASSERT(GetUndoActionCount(), "no undo actions available" ); if(!GetUndoActionCount()) return; @@ -2060,7 +2062,7 @@ void SentenceEditWindow_Impl::ResetUndo() -----------------------------------------------------------------------*/ void SentenceEditWindow_Impl::AddUndoAction( SfxUndoAction *pAction, BOOL bTryMerg ) { - SfxUndoManager& rUndoMgr = GetTextEngine()->GetUndoManager(); + ::svl::IUndoManager& rUndoMgr = GetTextEngine()->GetUndoManager(); rUndoMgr.AddUndoAction(pAction, bTryMerg); GetSpellDialog()->aUndoPB.Enable(); } @@ -2082,9 +2084,9 @@ void SentenceEditWindow_Impl::UndoActionStart( USHORT nId ) /*-- 12.11.2003 12:12:38--------------------------------------------------- -----------------------------------------------------------------------*/ -void SentenceEditWindow_Impl::UndoActionEnd( USHORT nId ) +void SentenceEditWindow_Impl::UndoActionEnd() { - GetTextEngine()->UndoActionEnd(nId); + GetTextEngine()->UndoActionEnd(); } /*-- 12.11.2003 12:12:38--------------------------------------------------- diff --git a/cui/source/dialogs/thesdlg_impl.hxx b/cui/source/dialogs/thesdlg_impl.hxx index d92039e7a..d92039e7a 100755..100644 --- a/cui/source/dialogs/thesdlg_impl.hxx +++ b/cui/source/dialogs/thesdlg_impl.hxx diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx index 49a219aa6..3b7ceb01e 100644 --- a/cui/source/inc/SpellDialog.hxx +++ b/cui/source/inc/SpellDialog.hxx @@ -121,7 +121,7 @@ public: void AddUndoAction( SfxUndoAction *pAction, BOOL bTryMerg=FALSE ); USHORT GetUndoActionCount(); void UndoActionStart( USHORT nId ); - void UndoActionEnd( USHORT nId ); + void UndoActionEnd(); void MoveErrorEnd(long nOffset); diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx index 705edb0c6..c17d253df 100644 --- a/cui/source/inc/cfgutil.hxx +++ b/cui/source/inc/cfgutil.hxx @@ -50,7 +50,6 @@ class SfxSlotPool; class SfxStringItem; class SfxFontItem; class SfxMacroInfoItem; -class SfxMacroInfo; struct SfxStyleInfo_Impl; struct SfxStylesInfo_Impl; @@ -95,29 +94,27 @@ struct SfxStylesInfo_Impl static ::rtl::OUString generateCommand(const ::rtl::OUString& sFamily, const ::rtl::OUString& sStyle); }; -#define SFX_CFGGROUP_FUNCTION 1 -#define SFX_CFGGROUP_BASICMGR 2 -#define SFX_CFGGROUP_DOCBASICMGR 3 -#define SFX_CFGGROUP_BASICLIB 4 -#define SFX_CFGGROUP_BASICMOD 5 -#define SFX_CFGFUNCTION_MACRO 6 -#define SFX_CFGFUNCTION_SLOT 7 -#define SFX_CFGGROUP_SCRIPTCONTAINER 8 -#define SFX_CFGFUNCTION_SCRIPT 9 -#define SFX_CFGGROUP_STYLES 10 -#define SFX_CFGGROUP_SPECIALCHARACTERS 11 +#define SFX_CFGGROUP_FUNCTION 1 +#define SFX_CFGFUNCTION_SLOT 2 +#define SFX_CFGGROUP_SCRIPTCONTAINER 3 +#define SFX_CFGFUNCTION_SCRIPT 4 +#define SFX_CFGGROUP_STYLES 5 struct SfxGroupInfo_Impl { USHORT nKind; - USHORT nOrd; + USHORT nUniqueID; void* pObject; BOOL bWasOpened; String sCommand; String sLabel; SfxGroupInfo_Impl( USHORT n, USHORT nr, void* pObj = 0 ) : - nKind( n ), nOrd( nr ), pObject( pObj ), bWasOpened(FALSE) {} + nKind( n ), nUniqueID( nr ), pObject( pObj ), bWasOpened(FALSE) {} +}; + +struct CuiMacroInfo +{ }; typedef SfxGroupInfo_Impl* SfxGroupInfoPtr; @@ -143,7 +140,7 @@ public: String GetHelpText( SvLBoxEntry *pEntry ); String GetCurCommand(); String GetCurLabel(); - SfxMacroInfo* GetMacroInfo(); + String GetSelectedScriptURI(); void FunctionSelected(); void SetStylesInfo(SfxStylesInfo_Impl* pStyles); }; @@ -156,8 +153,6 @@ class SfxConfigGroupListBox_Impl : public SvTreeListBox SfxConfigFunctionListBox_Impl* pFunctionListBox; SfxGroupInfoArr_Impl aArr; ULONG nMode; - BOOL bShowSF; // show Scripting Framework scripts - BOOL bShowBasic; // show Basic scripts ::rtl::OUString m_sModuleLongName; css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR; @@ -198,11 +193,8 @@ public: void Open( SvLBoxEntry*, BOOL ); void GroupSelected(); void SelectMacro( const SfxMacroInfoItem* ); - void AddAndSelect( const SfxStringItem*, const SfxStringItem* ); void SelectMacro( const String&, const String& ); String GetGroup(); - BasicManager* GetBasicManager( const SvLBoxEntry& _rEntry ); - void SetScriptType( const String& rScriptType ); void SetStylesInfo(SfxStylesInfo_Impl* pStyles); }; diff --git a/cui/source/inc/macroass.hxx b/cui/source/inc/macroass.hxx index 55fe62b24..409af0393 100644 --- a/cui/source/inc/macroass.hxx +++ b/cui/source/inc/macroass.hxx @@ -41,9 +41,6 @@ class SvTabListBox; class Edit; class String; -typedef SvStringsDtor* (*FNGetRangeHdl)( _SfxMacroTabPage*, const String& rLanguage ); -typedef SvStringsDtor* (*FNGetMacrosOfRangeHdl)( _SfxMacroTabPage*, const String& rLanguage, const String& rRange ); - class SfxConfigGroupListBox_Impl; class SfxConfigFunctionListBox_Impl; class _HeaderTabListBox; @@ -59,7 +56,6 @@ class _SfxMacroTabPage : public SfxTabPage DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, DoubleClickHdl_Impl, Control* ); DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, AssignDeleteHdl_Impl, PushButton * ); - DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, ChangeScriptHdl_Impl, RadioButton * ); DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, TimeOut_Impl, Timer* ); protected: @@ -70,7 +66,7 @@ protected: void InitAndSetHandler(); void FillEvents(); void FillMacroList(); - void EnableButtons( const String& rLanguage ); + void EnableButtons(); public: @@ -82,7 +78,7 @@ public: void SetMacroTbl( const SvxMacroTableDtor& rTbl ); void ClearMacroTbl(); - virtual void ScriptChanged( const String& rLanguage ); + virtual void ScriptChanged(); virtual void PageCreated (SfxAllItemSet aSet); // --------- Erben aus der Basis ------------- diff --git a/cui/source/inc/macropg.hxx b/cui/source/inc/macropg.hxx index 3d806083f..ac5c1ad2d 100644 --- a/cui/source/inc/macropg.hxx +++ b/cui/source/inc/macropg.hxx @@ -90,7 +90,7 @@ protected: _SvxMacroTabPage( Window* pParent, const ResId& rId, const SfxItemSet& rItemSet ); - void EnableButtons( const String& rLanguage ); + void EnableButtons(); ::com::sun::star::uno::Any GetPropsByName( const ::rtl::OUString& eventName, EventsHash& eventsHash ); ::std::pair< ::rtl::OUString, ::rtl::OUString > GetPairFromAny( ::com::sun::star::uno::Any aAny ); diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index 3448e5095..07c61d133 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -945,12 +945,14 @@ ColorConfigWindow_Impl::ColorConfigWindow_Impl(Window* pParent, const ResId& rRe aColorBoxes[0]->SetHelpId( aColorLBHids[0] ); + OSL_ENSURE( nCount < sal_Int32(sizeof(aColorLBHids)/sizeof(aColorLBHids[0])), "too few helpIDs for color listboxes" ); for( sal_Int32 i = 1; i < nCount; i++ ) { if(aColorBoxes[i]) { aColorBoxes[i]->CopyEntries( *aColorBoxes[0] ); - aColorBoxes[i]->SetHelpId( aColorLBHids[i] ); + if( i < sal_Int32(sizeof(aColorLBHids)/sizeof(aColorLBHids[0])) ) + aColorBoxes[i]->SetHelpId( aColorLBHids[i] ); } } } diff --git a/cui/source/options/optlingu.src b/cui/source/options/optlingu.src index 31e187a21..1e1d2e2fe 100644..100755 --- a/cui/source/options/optlingu.src +++ b/cui/source/options/optlingu.src @@ -354,11 +354,4 @@ QueryBox RID_SFXQB_DELDICT DefButton = WB_DEF_NO ; Message [ en-US ] = "Do you want to delete the dictionary?" ; }; - // RID_SFXQB_DEL_IGNORELIST ---------------------------------------------- -QueryBox RID_SFXQB_DEL_IGNORELIST -{ - Buttons = WB_YES_NO ; - DefButton = WB_DEF_NO ; - Message [ en-US ] = "Do you want to delete the ignore list?" ; -}; // ******************************************************************* EOF diff --git a/cui/source/options/webconninfo.cxx b/cui/source/options/webconninfo.cxx index f45be5210..f45be5210 100755..100644 --- a/cui/source/options/webconninfo.cxx +++ b/cui/source/options/webconninfo.cxx diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx index 68242aeff..50ac733cd 100644 --- a/cui/source/tabpages/macroass.cxx +++ b/cui/source/tabpages/macroass.cxx @@ -43,10 +43,11 @@ #include <svtools/svmedit.hxx> #include "cfgutil.hxx" #include <sfx2/app.hxx> +#include <sfx2/evntconf.hxx> #include <sfx2/objsh.hxx> #include "macroass.hrc" #include "cuires.hrc" -#include <sfx2/macrconf.hxx> +#include <vcl/fixed.hxx> #include "headertablistbox.hxx" using ::com::sun::star::uno::Reference; @@ -63,7 +64,6 @@ public: PushButton* pDeletePB; String* pStrEvent; String* pAssignedMacro; - ListBox* pScriptTypeLB; _HeaderTabListBox* pEventLB; SfxConfigGroupListBox_Impl* pGroupLB; FixedText* pFT_MacroLBLabel; @@ -71,8 +71,6 @@ public: FixedText* pMacroFT; String* pMacroStr; - FNGetRangeHdl fnGetRange; - FNGetMacrosOfRangeHdl fnGetMacroOfRange; BOOL bReadOnly; Timer maFillGroupTimer; @@ -84,15 +82,12 @@ _SfxMacroTabPage_Impl::_SfxMacroTabPage_Impl( void ) : pDeletePB( NULL ), pStrEvent( NULL ), pAssignedMacro( NULL ), - pScriptTypeLB( NULL ), pEventLB( NULL ), pGroupLB( NULL ), pFT_MacroLBLabel( NULL ), pMacroLB( NULL ), pMacroFT( NULL ), pMacroStr( NULL ), - fnGetRange( NULL ), - fnGetMacroOfRange( NULL ), bReadOnly( FALSE ), bGotEvents( FALSE ) { @@ -104,7 +99,6 @@ _SfxMacroTabPage_Impl::~_SfxMacroTabPage_Impl() delete pDeletePB; delete pStrEvent; delete pAssignedMacro; - delete pScriptTypeLB; delete pEventLB; delete pGroupLB; delete pMacroLB; @@ -114,9 +108,6 @@ _SfxMacroTabPage_Impl::~_SfxMacroTabPage_Impl() } -SvStringsDtor* _ImpGetRangeHdl( _SfxMacroTabPage*, const String& rLanguage ); -SvStringsDtor* _ImpGetMacrosOfRangeHdl( _SfxMacroTabPage*, const String& rLanguage, const String& rRange ); - static USHORT __FAR_DATA aPageRg[] = { SID_ATTR_MACROITEM, SID_ATTR_MACROITEM, 0 @@ -139,7 +130,7 @@ static long nTabs[] = #define LB_EVENTS_ITEMPOS 1 #define LB_MACROS_ITEMPOS 2 -String ConvertToUIName_Impl( SvxMacro *pMacro, const String& /*rLanguage*/ ) +String ConvertToUIName_Impl( SvxMacro *pMacro ) { String aName( pMacro->GetMacName() ); String aEntry; @@ -161,7 +152,7 @@ String ConvertToUIName_Impl( SvxMacro *pMacro, const String& /*rLanguage*/ ) return aName; } -void _SfxMacroTabPage::EnableButtons( const String& rLangName ) +void _SfxMacroTabPage::EnableButtons() { // Solange die Eventbox leer ist, nichts tun const SvLBoxEntry* pE = mpImpl->pEventLB->GetListBox().FirstSelected(); @@ -171,26 +162,14 @@ void _SfxMacroTabPage::EnableButtons( const String& rLangName ) const SvxMacro* pM = aTbl.Get( (USHORT)(ULONG) pE->GetUserData() ); mpImpl->pDeletePB->Enable( 0 != pM && !mpImpl->bReadOnly ); - // Bei gleichem ScriptType Zuweisung nur, wenn Macro sich - // ge"andert hat; bei verschiedenem ScriptType, wenn Script nicht leer String sEventMacro; sEventMacro = ((SvLBoxString*)pE->GetItem( LB_MACROS_ITEMPOS ))->GetText(); - if ( rLangName.EqualsAscii("JavaScript") ) - { - DBG_ERROR( "_SfxMacroTabPage::EnableButtons(): this is not an up to date usage!" ); - } - else - { - SfxMacroInfo* pInfo = mpImpl->pMacroLB->GetMacroInfo(); - String sSelMacro; - if ( pInfo ) - sSelMacro = pInfo->GetMacroName(); - if( pM && rLangName != pM->GetLanguage() ) - mpImpl->pAssignPB->Enable( pInfo != 0 && !mpImpl->bReadOnly ); - else - mpImpl->pAssignPB->Enable( pInfo && !mpImpl->bReadOnly && !sSelMacro.EqualsIgnoreCaseAscii( sEventMacro ) ); - } + + String sScriptURI = mpImpl->pMacroLB->GetSelectedScriptURI(); + mpImpl->pAssignPB->Enable( !mpImpl->bReadOnly && !sScriptURI.EqualsIgnoreCaseAscii( sEventMacro ) ); } + else + mpImpl->pAssignPB->Enable( FALSE ); } _SfxMacroTabPage::_SfxMacroTabPage( Window* pParent, const ResId& rResId, const SfxItemSet& rAttrSet ) @@ -198,8 +177,6 @@ _SfxMacroTabPage::_SfxMacroTabPage( Window* pParent, const ResId& rResId, const { mpImpl = new _SfxMacroTabPage_Impl; - mpImpl->fnGetRange = &_ImpGetRangeHdl; - mpImpl->fnGetMacroOfRange = &_ImpGetMacrosOfRangeHdl; } _SfxMacroTabPage::~_SfxMacroTabPage() @@ -216,7 +193,7 @@ void _SfxMacroTabPage::AddEvent( const String & rEventName, USHORT nEventId ) SvxMacro* pM = aTbl.Get( nEventId ); if( pM ) { - String sNew( ConvertToUIName_Impl( pM, mpImpl->pScriptTypeLB->GetSelectEntry() ) ); + String sNew( ConvertToUIName_Impl( pM ) ); sTmp += sNew; } @@ -224,17 +201,16 @@ void _SfxMacroTabPage::AddEvent( const String & rEventName, USHORT nEventId ) pE->SetUserData( reinterpret_cast< void* >( sal::static_int_cast< sal_IntPtr >( nEventId )) ); } -void _SfxMacroTabPage::ScriptChanged( const String& aLangName ) +void _SfxMacroTabPage::ScriptChanged() { // neue Bereiche und deren Funktionen besorgen { - mpImpl->pGroupLB->SetScriptType( aLangName ); mpImpl->pGroupLB->Show(); mpImpl->pMacroLB->Show(); mpImpl->pMacroFT->SetText( *mpImpl->pMacroStr ); } - EnableButtons( aLangName ); + EnableButtons(); } BOOL _SfxMacroTabPage::FillItemSet( SfxItemSet& rSet ) @@ -311,24 +287,8 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, SelectEvent_Impl, SvTabListBox*, EMPTYARG ) return 0; } - USHORT nEventId = (USHORT)(ULONG)pE->GetUserData(); - String aLanguage = pImpl->pScriptTypeLB->GetSelectEntry(); - - const SvxMacro* pM = pThis->aTbl.Get( nEventId ); - if( pM ) - { - if( aLanguage != pM->GetLanguage() ) - { - pImpl->pScriptTypeLB->SelectEntry( pM->GetLanguage() ); - pThis->ScriptChanged( pM->GetLanguage() ); - } - else - { - DBG_ASSERT( !aLanguage.EqualsAscii("JavaScript"), "_SfxMacroTabPage, SelectEvent_Impl(): outdated use!" ); - } - } - - pThis->EnableButtons( aLanguage ); + pThis->ScriptChanged(); + pThis->EnableButtons(); return 0; } @@ -336,26 +296,14 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, SelectGroup_Impl, ListBox*, EMPTYARG ) { _SfxMacroTabPage_Impl* pImpl = pThis->mpImpl; String sSel( pImpl->pGroupLB->GetGroup() ); - String aLanguage = pImpl->pScriptTypeLB->GetSelectEntry(); - if( !aLanguage.EqualsAscii( "JavaScript" ) ) - { - pImpl->pGroupLB->GroupSelected(); - SfxMacroInfo* pMacro = pImpl->pMacroLB->GetMacroInfo(); - String aLabelText; - if( pMacro ) - { - aLabelText = pImpl->maStaticMacroLBLabel; - aLabelText += pMacro->GetModuleName(); - } - else - { - // Wenn dort ein Macro drin ist, wurde es selektiert und der - // AssignButton schon in SelectMacro richtig enabled - pImpl->pAssignPB->Enable( FALSE ); - } - - pImpl->pFT_MacroLBLabel->SetText( aLabelText ); - } + pImpl->pGroupLB->GroupSelected(); + const String sScriptURI = pImpl->pMacroLB->GetSelectedScriptURI(); + String aLabelText; + if( sScriptURI.Len() > 0 ) + aLabelText = pImpl->maStaticMacroLBLabel; + pImpl->pFT_MacroLBLabel->SetText( aLabelText ); + + pThis->EnableButtons(); return 0; } @@ -363,7 +311,7 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, SelectMacro_Impl, ListBox*, EMPTYARG ) { _SfxMacroTabPage_Impl* pImpl = pThis->mpImpl; pImpl->pMacroLB->FunctionSelected(); - pThis->EnableButtons( pImpl->pScriptTypeLB->GetSelectEntry() ); + pThis->EnableButtons(); return 0; } @@ -387,51 +335,31 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, AssignDeleteHdl_Impl, PushButton*, pBtn ) SvxMacro *pRemoveMacro = pThis->aTbl.Remove( nEvent ); delete pRemoveMacro; - String aLanguage = pImpl->pScriptTypeLB->GetSelectEntry(); - String sNew; + String sScriptURI; if( bAssEnabled ) { - String sGroup; - String sMacro; - String aEntryText( sNew ); - DBG_ASSERT( !aLanguage.EqualsAscii("JavaScript"), "_SfxMacroTabPage, AssignDeleteHdl_Impl(): outdated use!" ); - - SfxMacroInfo* pMacro = pImpl->pMacroLB->GetMacroInfo(); - sMacro = pMacro->GetQualifiedName(); - sGroup = pImpl->pGroupLB->GetGroup(); - sNew = pMacro->GetMacroName(); - - if( sMacro.CompareToAscii( "vnd.sun.star.script:", 20 ) == COMPARE_EQUAL ) + sScriptURI = pImpl->pMacroLB->GetSelectedScriptURI(); + if( sScriptURI.CompareToAscii( "vnd.sun.star.script:", 20 ) == COMPARE_EQUAL ) { - OSL_TRACE("ASSIGN_DELETE: Its a script"); pThis->aTbl.Insert( - nEvent, new SvxMacro( sMacro, String::CreateFromAscii("Script") ) ); + nEvent, new SvxMacro( sScriptURI, String::CreateFromAscii( SVX_MACRO_LANGUAGE_SF ) ) ); } else { - OSL_TRACE("ASSIGN_DELETE: Its a basic macro"); - String sBasicName/*(SfxResId(STR_BASICNAME))*/; - if ( aLanguage == sBasicName ) - pThis->aTbl.Insert( nEvent, new SvxMacro( sMacro, sGroup, STARBASIC ) ); - else - pThis->aTbl.Insert( nEvent, new SvxMacro( sMacro, aLanguage ) ); + OSL_ENSURE( false, "_SfxMacroTabPage::AssignDeleteHdl_Impl: this branch is *not* dead? (out of interest: tell fs, please!)" ); + pThis->aTbl.Insert( + nEvent, new SvxMacro( sScriptURI, String::CreateFromAscii( SVX_MACRO_LANGUAGE_STARBASIC ) ) ); } } pImpl->pEventLB->SetUpdateMode( FALSE ); - pE->ReplaceItem( new SvLBoxString( pE, 0, sNew ), LB_MACROS_ITEMPOS ); + pE->ReplaceItem( new SvLBoxString( pE, 0, sScriptURI ), LB_MACROS_ITEMPOS ); rListBox.GetModel()->InvalidateEntry( pE ); rListBox.Select( pE ); rListBox.MakeVisible( pE ); rListBox.SetUpdateMode( TRUE ); - pThis->EnableButtons( aLanguage ); - return 0; -} - -IMPL_STATIC_LINK( _SfxMacroTabPage, ChangeScriptHdl_Impl, RadioButton*, EMPTYARG ) -{ - pThis->ScriptChanged( pThis->mpImpl->pScriptTypeLB->GetSelectEntry() ); + pThis->EnableButtons(); return 0; } @@ -469,8 +397,6 @@ void _SfxMacroTabPage::InitAndSetHandler() mpImpl->pGroupLB->SetSelectHdl( STATIC_LINK( this, _SfxMacroTabPage, SelectGroup_Impl )); mpImpl->pMacroLB->SetSelectHdl( STATIC_LINK( this, _SfxMacroTabPage, SelectMacro_Impl )); - mpImpl->pScriptTypeLB->SetSelectHdl( STATIC_LINK( this, _SfxMacroTabPage, ChangeScriptHdl_Impl )); - rListBox.SetSelectionMode( SINGLE_SELECTION ); rListBox.SetTabs( &nTabs[0], MAP_APPFONT ); Size aSize( nTabs[ 2 ], 0 ); @@ -486,11 +412,6 @@ void _SfxMacroTabPage::InitAndSetHandler() mpImpl->pGroupLB->Enable( TRUE ); mpImpl->pMacroLB->Enable( TRUE ); - mpImpl->pScriptTypeLB->SetDropDownLineCount( 3 ); - String sBasicName/*(SfxResId(STR_BASICNAME))*/; - mpImpl->pScriptTypeLB->InsertEntry( sBasicName ); - mpImpl->pScriptTypeLB->SelectEntry( sBasicName ); - mpImpl->pGroupLB->SetFunctionListBox( mpImpl->pMacroLB ); mpImpl->maFillGroupTimer.SetTimeoutHdl( STATIC_LINK( this, _SfxMacroTabPage, TimeOut_Impl ) ); @@ -500,29 +421,17 @@ void _SfxMacroTabPage::InitAndSetHandler() void _SfxMacroTabPage::FillMacroList() { - String aLanguage = mpImpl->pScriptTypeLB->GetSelectEntry(); - if( ! aLanguage.EqualsAscii("JavaScript") ) - { - // 2 Listboxen - SvStringsDtor* pArr = (*mpImpl->fnGetRange)( this, String(/*SfxResId(STR_BASICNAME)*/) ); - if( pArr ) - { - mpImpl->pGroupLB->Init( - ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XMultiServiceFactory >(), - GetFrame(), - ::rtl::OUString() ); - - delete pArr; - } - } + mpImpl->pGroupLB->Init( + ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XMultiServiceFactory >(), + GetFrame(), + ::rtl::OUString() ); } void _SfxMacroTabPage::FillEvents() { SvHeaderTabListBox& rListBox = mpImpl->pEventLB->GetListBox(); - String aLanguage = mpImpl->pScriptTypeLB->GetSelectEntry(); ULONG nEntryCnt = rListBox.GetEntryCount(); // Events aus der Tabelle holen und die EventListBox entsprechen fuellen @@ -538,7 +447,7 @@ void _SfxMacroTabPage::FillEvents() String sNew; USHORT nEventId = ( USHORT ) ( ULONG ) pE->GetUserData(); if( aTbl.IsKeyValid( nEventId ) ) - sNew = ConvertToUIName_Impl( aTbl.Get( nEventId ), aLanguage ); + sNew = ConvertToUIName_Impl( aTbl.Get( nEventId ) ); if( sOld != sNew ) { @@ -549,78 +458,6 @@ void _SfxMacroTabPage::FillEvents() } } -SvStringsDtor* __EXPORT _ImpGetRangeHdl( _SfxMacroTabPage* /*pTbPg*/, const String& rLanguage ) -{ - SvStringsDtor* pNew = new SvStringsDtor; - SfxApplication* pSfxApp = SFX_APP(); - - if ( !rLanguage.EqualsAscii("JavaScript") ) - { - pSfxApp->EnterBasicCall(); - - // AppBasic einf"ugen - String* pNewEntry = new String( pSfxApp->GetName() ); - pNew->Insert( pNewEntry, pNew->Count() ); - - // Aktuelles Dokument - SfxObjectShell* pDoc = SfxObjectShell::Current(); - if ( pDoc ) - { - String aTitle = pDoc->GetTitle(); - - // Hack f"ur Aufruf aus der Basic-IDE : das Basic ermitteln, das - // gerade bearbeitet wird - - String aAppName(DEFINE_CONST_UNICODE("BASIC - ")); - USHORT nLen = aAppName.Len(); - if ( aTitle.CompareIgnoreCaseToAscii( aAppName, nLen ) == COMPARE_EQUAL ) - { - // Basic-Namensprefix entfernen - aTitle.Erase( 0, nLen ); - USHORT nIndex=0, nCount=aTitle.GetTokenCount('.'); - if ( nCount > 1 ) - { - // Namen der Library entfernen - aTitle.GetToken( nCount-2, '.', nIndex ); - aTitle.Erase( nIndex-1 ); - } - - // Wenn das App-Basic gerade in der Basic-IDE bearbeitet wird, kein - // Dokument verwenden - pDoc = SfxObjectShell::GetFirst(); - while( pDoc ) - { - if ( aTitle == pDoc->GetTitle() ) - break; - pDoc = SfxObjectShell::GetNext( *pDoc ); - } - } - - if ( pDoc && pDoc->GetBasicManager() != SFX_APP()->GetBasicManager() && - pDoc->GetBasicManager()->GetLibCount() ) - { - pNewEntry = new String( aTitle ); - pNew->Insert( pNewEntry, pNew->Count() ); - } - } - - pSfxApp->LeaveBasicCall(); - } - - return pNew; -} - -// besorgen der Funktionen eines Bereiches -SvStringsDtor* __EXPORT _ImpGetMacrosOfRangeHdl( - _SfxMacroTabPage* /*pTbPg*/, - const String& /*rLanguage*/, - const String& /*rRange*/ ) -{ - SvStringsDtor* pNew = new SvStringsDtor; - return pNew; -} - - SfxMacroTabPage::SfxMacroTabPage( Window* pParent, const ResId& rResId, const Reference< XFrame >& rxDocumentFrame, const SfxItemSet& rSet ) : _SfxMacroTabPage( pParent, rResId, rSet ) { @@ -629,8 +466,6 @@ SfxMacroTabPage::SfxMacroTabPage( Window* pParent, const ResId& rResId, const Re mpImpl->pEventLB = new _HeaderTabListBox( this, CUI_RES( LB_EVENT ) ); mpImpl->pAssignPB = new PushButton( this, CUI_RES( PB_ASSIGN ) ); mpImpl->pDeletePB = new PushButton( this, CUI_RES( PB_DELETE ) ); - mpImpl->pScriptTypeLB = new ListBox(this, CUI_RES( LB_SCRIPTTYPE ) ); - mpImpl->pScriptTypeLB->Hide(); mpImpl->pMacroFT = new FixedText( this, CUI_RES( FT_MACRO ) ); mpImpl->pGroupLB = new SfxConfigGroupListBox_Impl( this, CUI_RES( LB_GROUP ) ); mpImpl->pFT_MacroLBLabel = new FixedText( this, CUI_RES( FT_LABEL4LB_MACROS ) ); @@ -644,7 +479,7 @@ SfxMacroTabPage::SfxMacroTabPage( Window* pParent, const ResId& rResId, const Re InitAndSetHandler(); - ScriptChanged( String( /*SfxResId(STR_BASICNAME)*/ ) ); + ScriptChanged(); } SfxTabPage* SfxMacroTabPage::Create( Window* pParent, const SfxItemSet& rAttrSet ) diff --git a/cui/source/tabpages/macroass.hrc b/cui/source/tabpages/macroass.hrc index 9c6fd7ccd..997bb6cf9 100644 --- a/cui/source/tabpages/macroass.hrc +++ b/cui/source/tabpages/macroass.hrc @@ -38,7 +38,7 @@ #define FT_MACRO 5 #define LB_GROUP 6 #define LB_MACROS 7 -#define LB_SCRIPTTYPE 8 + // FREE #define FT_LABEL4LB_MACROS 9 #define STR_JAVASCRIPT 10 #define STR_MACROS 11 diff --git a/cui/source/tabpages/macroass.src b/cui/source/tabpages/macroass.src index d97aa813d..ac09f0cb8 100644 --- a/cui/source/tabpages/macroass.src +++ b/cui/source/tabpages/macroass.src @@ -78,7 +78,7 @@ TabPage RID_SVXPAGE_EVENTASSIGN Pos = MAP_APPFONT ( COL2 , ROW7 ) ; Size = MAP_APPFONT ( WIDTH1 , RSC_CD_FIXEDTEXT_HEIGHT + HEIGHT_EXTRA7 ) ; WordBreak = TRUE; - Text [ en-US ] = "~Existing macros in:\n" ; + Text [ en-US ] = "~Existing macros\n" ; }; Control LB_MACROS { @@ -107,17 +107,6 @@ TabPage RID_SVXPAGE_EVENTASSIGN TabStop = TRUE ; Text [ en-US ] = "~Remove" ; }; - ListBox LB_SCRIPTTYPE - { - HelpID = "cui:ListBox:RID_SVXPAGE_EVENTASSIGN:LB_SCRIPTTYPE"; - Pos = MAP_APPFONT ( COL4 , ROW4 ) ; - Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , 60 ) ; - // en-US was missing - Text [ en-US ] = "~Scripting Language" ; - TabStop = TRUE ; - Disable = FALSE ; - DropDown = TRUE ; - }; String STR_MACROS { Text [ en-US ] = "Macros" ; diff --git a/cui/source/tabpages/page.h b/cui/source/tabpages/page.h index 8fc965bcc..33c5b943b 100644 --- a/cui/source/tabpages/page.h +++ b/cui/source/tabpages/page.h @@ -29,6 +29,11 @@ // define ---------------------------------------------------------------- +//!! the values of the following defines must correspond to the array position +//!! of the respective paper size in the file i18npool/source/paper/paper.cxx +//!! There are enums for them in i18npool/inc/i18npool/paper.hxx but unfortunately +//!! the resource compiler does not understand enums, thus the enum values need +//!! to be duplicated here for use in the src file. #define PAPERSIZE_A0 0 #define PAPERSIZE_A1 1 #define PAPERSIZE_A2 2 @@ -66,6 +71,7 @@ #define PAPERSIZE_B4_JIS 34 #define PAPERSIZE_B5_JIS 35 #define PAPERSIZE_B6_JIS 36 +#define PAPERSIZE_A6 56 #endif diff --git a/cui/source/tabpages/page.src b/cui/source/tabpages/page.src index 5e174f3e1..0de093b21 100644 --- a/cui/source/tabpages/page.src +++ b/cui/source/tabpages/page.src @@ -389,6 +389,7 @@ StringArray RID_SVXSTRARY_PAPERSIZE_STD { ItemList [ en-US ] = { + < "A6" ; PAPERSIZE_A6 ; > ; < "A5" ; PAPERSIZE_A5 ; > ; < "A4" ; PAPERSIZE_A4 ; > ; < "A3" ; PAPERSIZE_A3 ; > ; @@ -423,6 +424,7 @@ StringArray RID_SVXSTRARY_PAPERSIZE_DRAW { ItemList [ en-US ] = { + < "A6" ; PAPERSIZE_A6 ; > ; < "A5" ; PAPERSIZE_A5 ; > ; < "A4" ; PAPERSIZE_A4 ; > ; < "A3" ; PAPERSIZE_A3 ; > ; diff --git a/extensions/inc/pch/precompiled_extensions.hxx b/extensions/inc/pch/precompiled_extensions.hxx index 76724e1fc..b909c5866 100644..100755 --- a/extensions/inc/pch/precompiled_extensions.hxx +++ b/extensions/inc/pch/precompiled_extensions.hxx @@ -533,7 +533,7 @@ #include "unotools/processfactory.hxx" -#include "vcl/fldunit.hxx" +#include "tools/fldunit.hxx" #include "vos/conditn.hxx" #include "vos/diagnose.hxx" diff --git a/extensions/source/oooimprovement/onlogrotate_job.cxx b/extensions/source/oooimprovement/onlogrotate_job.cxx index 42dc001ed..8b73c7ff1 100644 --- a/extensions/source/oooimprovement/onlogrotate_job.cxx +++ b/extensions/source/oooimprovement/onlogrotate_job.cxx @@ -128,17 +128,21 @@ namespace } { ::osl::Guard< ::osl::Mutex> service_factory_guard(m_ServiceFactoryMutex); - if(m_ServiceFactory.is()) + try { - if(Config(m_ServiceFactory).getInvitationAccepted()) + if(m_ServiceFactory.is()) { - packLogs(m_ServiceFactory); - uploadLogs(m_ServiceFactory); + if(Config(m_ServiceFactory).getInvitationAccepted()) + { + packLogs(m_ServiceFactory); + uploadLogs(m_ServiceFactory); + } + else + LogStorage(m_ServiceFactory).clear(); } - else - LogStorage(m_ServiceFactory).clear(); + m_ServiceFactory.clear(); } - m_ServiceFactory.clear(); + catch(...) {} } } @@ -158,16 +162,25 @@ namespace m_Thread->create(); } virtual ~OnLogRotateThreadWatcher() - { m_Thread->disposing()->terminate(); }; + { + m_Thread->disposing()->terminate(); + m_Thread->join(); + }; // XTerminateListener virtual void SAL_CALL queryTermination(const EventObject&) throw(RuntimeException) { }; virtual void SAL_CALL notifyTermination(const EventObject&) throw(RuntimeException) - { m_Thread->disposing()->terminate(); }; + { + m_Thread->disposing()->terminate(); + m_Thread->join(); + }; // XEventListener virtual void SAL_CALL disposing(const EventObject&) throw(RuntimeException) - { m_Thread->disposing()->terminate(); }; + { + m_Thread->disposing()->terminate(); + m_Thread->join(); + }; private: ::std::auto_ptr<OnLogRotateThread> m_Thread; }; diff --git a/extensions/source/propctrlr/formcomponenthandler.hxx b/extensions/source/propctrlr/formcomponenthandler.hxx index 37b07c238..df844e897 100644 --- a/extensions/source/propctrlr/formcomponenthandler.hxx +++ b/extensions/source/propctrlr/formcomponenthandler.hxx @@ -41,7 +41,7 @@ #include <com/sun/star/awt/XControlContainer.hpp> #include <com/sun/star/form/XForm.hpp> /** === end UNO includes === **/ -#include <vcl/fldunit.hxx> +#include <tools/fldunit.hxx> #include <vcl/waitobj.hxx> #include <connectivity/dbtools.hxx> diff --git a/forms/inc/pch/precompiled_forms.hxx b/forms/inc/pch/precompiled_forms.hxx index 4e31cc6a5..ba5bacbac 100644..100755 --- a/forms/inc/pch/precompiled_forms.hxx +++ b/forms/inc/pch/precompiled_forms.hxx @@ -389,10 +389,10 @@ #include "vcl/bmpacc.hxx" #include "vcl/cvtgrf.hxx" #include "vcl/mapmod.hxx" -#include "vcl/mapunit.hxx" +#include "tools/mapunit.hxx" #include "vcl/stdtext.hxx" #include "vcl/timer.hxx" -#include "vcl/wintypes.hxx" +#include "tools/wintypes.hxx" #include "vos/mutex.hxx" #include "vos/thread.hxx" diff --git a/forms/source/component/Edit.cxx b/forms/source/component/Edit.cxx index 3ded17a1d..f8097e0aa 100644 --- a/forms/source/component/Edit.cxx +++ b/forms/source/component/Edit.cxx @@ -39,7 +39,7 @@ #include <com/sun/star/awt/XVclWindowPeer.hpp> #include <vcl/svapp.hxx> -#include <vcl/wintypes.hxx> +#include <tools/wintypes.hxx> #include <connectivity/dbtools.hxx> #include <connectivity/formattedcolumnvalue.hxx> diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx index 49b0779dc..a9a5e93ec 100644 --- a/forms/source/component/Filter.cxx +++ b/forms/source/component/Filter.cxx @@ -72,7 +72,7 @@ #include <unotools/localedatawrapper.hxx> #include <vcl/stdtext.hxx> #include <vcl/svapp.hxx> -#include <vcl/wintypes.hxx> +#include <tools/wintypes.hxx> //-------------------------------------------------------------------------- extern "C" void SAL_CALL createRegistryInfo_OFilterControl() diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx index 84dd665b1..bae4162ae 100644 --- a/forms/source/component/FormattedField.cxx +++ b/forms/source/component/FormattedField.cxx @@ -43,7 +43,7 @@ #include <svl/numuno.hxx> #include <vcl/svapp.hxx> #include <tools/debug.hxx> -#include <vcl/wintypes.hxx> +#include <tools/wintypes.hxx> #include <i18npool/mslangid.hxx> #include <rtl/textenc.h> #include <com/sun/star/sdbc/DataType.hpp> diff --git a/forms/source/richtext/richtextcontrol.hxx b/forms/source/richtext/richtextcontrol.hxx index e4ba4d401..cc23fd886 100644 --- a/forms/source/richtext/richtextcontrol.hxx +++ b/forms/source/richtext/richtextcontrol.hxx @@ -37,7 +37,7 @@ #include <comphelper/uno3.hxx> #include <comphelper/implementationreference.hxx> #include <cppuhelper/implbase1.hxx> -#include <vcl/wintypes.hxx> +#include <tools/wintypes.hxx> #include "rtattributes.hxx" #include "attributedispatcher.hxx" diff --git a/forms/source/richtext/richtextengine.cxx b/forms/source/richtext/richtextengine.cxx index 63b16f943..8659c24a5 100644 --- a/forms/source/richtext/richtextengine.cxx +++ b/forms/source/richtext/richtextengine.cxx @@ -38,7 +38,7 @@ #define ITEMID_LANGUAGE EE_CHAR_LANGUAGE #include <editeng/langitem.hxx> #include <vcl/svapp.hxx> -#include <vcl/mapunit.hxx> +#include <tools/mapunit.hxx> #include <vcl/mapmod.hxx> #include <vcl/outdev.hxx> #include <unotools/lingucfg.hxx> diff --git a/forms/source/richtext/richtextimplcontrol.cxx b/forms/source/richtext/richtextimplcontrol.cxx index c6918be2e..d2aa62ae9 100644 --- a/forms/source/richtext/richtextimplcontrol.cxx +++ b/forms/source/richtext/richtextimplcontrol.cxx @@ -42,7 +42,7 @@ #include <editeng/editobj.hxx> #include <svl/itempool.hxx> #include <svl/itemset.hxx> -#include <vcl/mapunit.hxx> +#include <tools/mapunit.hxx> #include <vcl/window.hxx> #include <vcl/svapp.hxx> diff --git a/forms/source/richtext/rtattributehandler.cxx b/forms/source/richtext/rtattributehandler.cxx index 5a4957e37..1888e3471 100644 --- a/forms/source/richtext/rtattributehandler.cxx +++ b/forms/source/richtext/rtattributehandler.cxx @@ -35,7 +35,7 @@ #include <editeng/eeitem.hxx> #include <svl/itemset.hxx> #include <svl/itempool.hxx> -#include <vcl/mapunit.hxx> +#include <tools/mapunit.hxx> #include <vcl/mapmod.hxx> #include <vcl/outdev.hxx> diff --git a/forms/source/solar/component/navbarcontrol.hxx b/forms/source/solar/component/navbarcontrol.hxx index 2e585a455..0af5b0074 100644 --- a/forms/source/solar/component/navbarcontrol.hxx +++ b/forms/source/solar/component/navbarcontrol.hxx @@ -39,7 +39,7 @@ #include <toolkit/awt/vclxwindow.hxx> #include <comphelper/uno3.hxx> #include <cppuhelper/implbase1.hxx> -#include <vcl/wintypes.hxx> +#include <tools/wintypes.hxx> //......................................................................... namespace frm diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx index 86508918e..86508918e 100755..100644 --- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx +++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx diff --git a/lingucomponent/source/lingutil/lingutil.cxx b/lingucomponent/source/lingutil/lingutil.cxx index 15c019a14..15c019a14 100755..100644 --- a/lingucomponent/source/lingutil/lingutil.cxx +++ b/lingucomponent/source/lingutil/lingutil.cxx diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx b/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx index 5fb9fbdd3..5fb9fbdd3 100755..100644 --- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx +++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx index 58f4ddc71..58f4ddc71 100755..100644 --- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx +++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.hxx b/lingucomponent/source/spellcheck/spell/sspellimp.hxx index adc8ca953..adc8ca953 100755..100644 --- a/lingucomponent/source/spellcheck/spell/sspellimp.hxx +++ b/lingucomponent/source/spellcheck/spell/sspellimp.hxx diff --git a/lingucomponent/source/thesaurus/libnth/nthesdta.hxx b/lingucomponent/source/thesaurus/libnth/nthesdta.hxx index 12253528f..12253528f 100755..100644 --- a/lingucomponent/source/thesaurus/libnth/nthesdta.hxx +++ b/lingucomponent/source/thesaurus/libnth/nthesdta.hxx diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx index 275049ee1..275049ee1 100755..100644 --- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx +++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.hxx b/lingucomponent/source/thesaurus/libnth/nthesimp.hxx index c717587bb..c717587bb 100755..100644 --- a/lingucomponent/source/thesaurus/libnth/nthesimp.hxx +++ b/lingucomponent/source/thesaurus/libnth/nthesimp.hxx diff --git a/package/source/manifest/ManifestExport.cxx b/package/source/manifest/ManifestExport.cxx index 580c3f92e..92d1f07a4 100644 --- a/package/source/manifest/ManifestExport.cxx +++ b/package/source/manifest/ManifestExport.cxx @@ -166,6 +166,11 @@ ManifestExport::ManifestExport(Reference < XDocumentHandler > xHandler, const S { // this is ODF12 generation, let encrypted streams contain start-key-generation entry bStoreStartKeyGeneration = sal_True; + + // starting from ODF12 the version should be also in manifest:manifest element + pRootAttrList->AddAttribute ( OUString( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_VERSION ) ), + sCdataAttribute, + aDocVersion ); } } else diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx index ce4378609..3f98eded0 100644 --- a/package/source/zipapi/ZipFile.cxx +++ b/package/source/zipapi/ZipFile.cxx @@ -836,13 +836,18 @@ sal_Int32 ZipFile::recover() aGrabber.seek( 0 ); - for( sal_Int32 nGenPos = 0; aGrabber.readBytes( aBuffer, 32000 ) && aBuffer.getLength() > 30; ) + const sal_Int32 nToRead = 32000; + for( sal_Int32 nGenPos = 0; aGrabber.readBytes( aBuffer, nToRead ) && aBuffer.getLength() > 16; ) { const sal_Int8 *pBuffer = aBuffer.getConstArray(); sal_Int32 nBufSize = aBuffer.getLength(); sal_Int32 nPos = 0; - while( nPos < nBufSize - 16 ) + // the buffer should contain at least one header, + // or if it is end of the file, at least the postheader with sizes and hash + while( nPos < nBufSize - 30 + || ( aBuffer.getLength() < nToRead && nPos < nBufSize - 16 ) ) + { if ( nPos < nBufSize - 30 && pBuffer[nPos] == 'P' && pBuffer[nPos+1] == 'K' && pBuffer[nPos+2] == 3 && pBuffer[nPos+3] == 4 ) { diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx index d2c81b993..70df2792c 100644 --- a/package/source/zippackage/ZipPackageFolder.cxx +++ b/package/source/zippackage/ZipPackageFolder.cxx @@ -271,11 +271,10 @@ Sequence< OUString > SAL_CALL ZipPackageFolder::getElementNames( ) { sal_uInt32 i=0, nSize = maContents.size(); Sequence < OUString > aSequence ( nSize ); - OUString *pNames = aSequence.getArray(); for ( ContentHash::const_iterator aIterator = maContents.begin(), aEnd = maContents.end(); aIterator != aEnd; ++i, ++aIterator) - pNames[i] = (*aIterator).first; + aSequence[i] = (*aIterator).first; return aSequence; } sal_Bool SAL_CALL ZipPackageFolder::hasByName( const OUString& aName ) @@ -358,7 +357,6 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr const ContentInfo &rInfo = *(*aCI).second; Sequence < PropertyValue > aPropSet (PKG_SIZE_NOENCR_MNFST); - PropertyValue *pValue = aPropSet.getArray(); if ( rInfo.bFolder ) pFolder = rInfo.pFolder; @@ -369,13 +367,18 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr { OUString sTempName = rPath + rShortName + OUString( RTL_CONSTASCII_USTRINGPARAM ( "/" ) ); - pValue[PKG_MNFST_MEDIATYPE].Name = sMediaTypeProperty; - pValue[PKG_MNFST_MEDIATYPE].Value <<= pFolder->GetMediaType(); - pValue[PKG_MNFST_VERSION].Name = sVersionProperty; - pValue[PKG_MNFST_VERSION].Value <<= pFolder->GetVersion(); - pValue[PKG_MNFST_FULLPATH].Name = sFullPathProperty; - pValue[PKG_MNFST_FULLPATH].Value <<= sTempName; - + if ( pFolder->GetMediaType().getLength() ) + { + aPropSet[PKG_MNFST_MEDIATYPE].Name = sMediaTypeProperty; + aPropSet[PKG_MNFST_MEDIATYPE].Value <<= pFolder->GetMediaType(); + aPropSet[PKG_MNFST_VERSION].Name = sVersionProperty; + aPropSet[PKG_MNFST_VERSION].Value <<= pFolder->GetVersion(); + aPropSet[PKG_MNFST_FULLPATH].Name = sFullPathProperty; + aPropSet[PKG_MNFST_FULLPATH].Value <<= sTempName; + } + else + aPropSet.realloc( 0 ); + pFolder->saveContents( sTempName, rManList, rZipOut, rEncryptionKey, rRandomPool); } else @@ -395,12 +398,12 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr sal_Bool bToBeEncrypted = pStream->IsToBeEncrypted() && (bHaveEncryptionKey || pStream->HasOwnKey()); sal_Bool bToBeCompressed = bToBeEncrypted ? sal_True : pStream->IsToBeCompressed(); - pValue[PKG_MNFST_MEDIATYPE].Name = sMediaTypeProperty; - pValue[PKG_MNFST_MEDIATYPE].Value <<= pStream->GetMediaType( ); - pValue[PKG_MNFST_VERSION].Name = sVersionProperty; - pValue[PKG_MNFST_VERSION].Value <<= ::rtl::OUString(); // no version is stored for streams currently - pValue[PKG_MNFST_FULLPATH].Name = sFullPathProperty; - pValue[PKG_MNFST_FULLPATH].Value <<= pTempEntry->sPath; + aPropSet[PKG_MNFST_MEDIATYPE].Name = sMediaTypeProperty; + aPropSet[PKG_MNFST_MEDIATYPE].Value <<= pStream->GetMediaType( ); + aPropSet[PKG_MNFST_VERSION].Name = sVersionProperty; + aPropSet[PKG_MNFST_VERSION].Value <<= ::rtl::OUString(); // no version is stored for streams currently + aPropSet[PKG_MNFST_FULLPATH].Name = sFullPathProperty; + aPropSet[PKG_MNFST_FULLPATH].Value <<= pTempEntry->sPath; OSL_ENSURE( pStream->GetStreamMode() != PACKAGE_STREAM_NOTSET, "Unacceptable ZipPackageStream mode!" ); @@ -522,23 +525,22 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr // a magic header aPropSet.realloc(PKG_SIZE_ENCR_MNFST); - pValue = aPropSet.getArray(); - pValue[PKG_MNFST_INIVECTOR].Name = sInitialisationVectorProperty; - pValue[PKG_MNFST_INIVECTOR].Value <<= pStream->getInitialisationVector(); - pValue[PKG_MNFST_SALT].Name = sSaltProperty; - pValue[PKG_MNFST_SALT].Value <<= pStream->getSalt(); - pValue[PKG_MNFST_ITERATION].Name = sIterationCountProperty; - pValue[PKG_MNFST_ITERATION].Value <<= pStream->getIterationCount (); + aPropSet[PKG_MNFST_INIVECTOR].Name = sInitialisationVectorProperty; + aPropSet[PKG_MNFST_INIVECTOR].Value <<= pStream->getInitialisationVector(); + aPropSet[PKG_MNFST_SALT].Name = sSaltProperty; + aPropSet[PKG_MNFST_SALT].Value <<= pStream->getSalt(); + aPropSet[PKG_MNFST_ITERATION].Name = sIterationCountProperty; + aPropSet[PKG_MNFST_ITERATION].Value <<= pStream->getIterationCount (); // Need to store the uncompressed size in the manifest OSL_ENSURE( nOwnStreamOrigSize >= 0, "The stream size was not correctly initialized!\n" ); - pValue[PKG_MNFST_UCOMPSIZE].Name = sSizeProperty; - pValue[PKG_MNFST_UCOMPSIZE].Value <<= nOwnStreamOrigSize; + aPropSet[PKG_MNFST_UCOMPSIZE].Name = sSizeProperty; + aPropSet[PKG_MNFST_UCOMPSIZE].Value <<= nOwnStreamOrigSize; if ( bRawStream || bTransportOwnEncrStreamAsRaw ) { - pValue[PKG_MNFST_DIGEST].Name = sDigestProperty; - pValue[PKG_MNFST_DIGEST].Value <<= pStream->getDigest(); + aPropSet[PKG_MNFST_DIGEST].Name = sDigestProperty; + aPropSet[PKG_MNFST_DIGEST].Value <<= pStream->getDigest(); } } } @@ -655,8 +657,8 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr if ( bToBeEncrypted ) { - pValue[PKG_MNFST_DIGEST].Name = sDigestProperty; - pValue[PKG_MNFST_DIGEST].Value <<= pStream->getDigest(); + aPropSet[PKG_MNFST_DIGEST].Name = sDigestProperty; + aPropSet[PKG_MNFST_DIGEST].Value <<= pStream->getDigest(); pStream->SetIsEncrypted ( sal_True ); } } @@ -695,7 +697,8 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr } // folder can have a mediatype only in package format - if ( m_nFormat == embed::StorageFormats::PACKAGE || ( m_nFormat == embed::StorageFormats::OFOPXML && !rInfo.bFolder ) ) + if ( aPropSet.getLength() + && ( m_nFormat == embed::StorageFormats::PACKAGE || ( m_nFormat == embed::StorageFormats::OFOPXML && !rInfo.bFolder ) ) ) rManList.push_back( aPropSet ); } diff --git a/setup_native/scripts/admin.pl b/setup_native/scripts/admin.pl index d90c76650..57cae516b 100644 --- a/setup_native/scripts/admin.pl +++ b/setup_native/scripts/admin.pl @@ -1127,7 +1127,7 @@ sub register_extensions_sync $preregdir =~ s/\/\s*$//g; - my $systemcall = $executable . " sync --verbose -env:BUNDLED_EXTENSIONS_USER=\"file:///" . $preregdir . "\"" . " -env:UserInstallation=file:///" . $localtemppath . " 2\>\&1 |"; + my $systemcall = $executable . " sync --verbose 2\>\&1 |"; print "... $systemcall\n"; diff --git a/setup_native/source/packinfo/shellscripts_extensions.txt b/setup_native/source/packinfo/shellscripts_extensions.txt index c73e7fae5..0be870990 100755 --- a/setup_native/source/packinfo/shellscripts_extensions.txt +++ b/setup_native/source/packinfo/shellscripts_extensions.txt @@ -2,26 +2,6 @@ %postinstall << END -if [ -n "$$TMPDIR" ]; then - UNOPKGTMP="$$TMPDIR" -elif [ -n "$$TMP" ]; then - UNOPKGTMP="$$TMP" -elif [ -d "/tmp" ]; then - UNOPKGTMP="/tmp" -else - echo "No tmp directory found!" - exit 1 -fi - -#Create the command which creates a temporary directory -if [ -x "/usr/bin/mktemp" ] -then - INSTDIR=`/usr/bin/mktemp -d "$${UNOPKGTMP}/userinstall.XXXXXX"` -else - INSTDIR="$${UNOPKGTMP}/userinstall.$$$$" - mkdir "$$INSTDIR" -fi - # # Need to check diskless service install and make sure use the correct unpkg # @@ -38,7 +18,7 @@ fi if [ -x $$POSTRUN ]; then ( echo "test -x \"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" || exit 0" echo "umask 022" - echo "\"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" sync \"-env:BUNDLED_EXTENSIONS_USER=file:////$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/share/prereg/bundled\" \"-env:UserInstallation=file:////$$INSTDIR\" '-env:UNO_JAVA_JFW_INSTALL_DATA=\$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'" + echo "\"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" sync" echo "find \"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/share/prereg/bundled\" -type f -exec chmod 644 {} \\;" ) | $$POSTRUN -b -c UNOPKG if [ "$$?" != "0" ]; then @@ -48,7 +28,7 @@ if [ -x $$POSTRUN ]; then fi else # No postrun available, try running unopkg directly - "$$UNOPKG" sync "-env:BUNDLED_EXTENSIONS_USER=file:////////$$BASEDIR/PRODUCTDIRECTORYNAME/share/prereg/bundled" "-env:UserInstallation=file:////////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1' + "$$UNOPKG" sync find "$$BASEDIR/PRODUCTDIRECTORYNAME/share/prereg/bundled" -type f -exec chmod 644 {} \; if [ "$$?" != "0" ]; then echo "\nERROR: Installation of UNO extensions failed." @@ -58,48 +38,23 @@ else fi fi -if [ -n "$$INSTDIR" ]; then - rm -rf "$$INSTDIR" -fi - exit 0 END %postremove << END -if [ -n "$$TMPDIR" ]; then - UNOPKGTMP="$$TMPDIR" -elif [ -n "$$TMP" ]; then - UNOPKGTMP="$$TMP" -elif [ -d "/tmp" ]; then - UNOPKGTMP="/tmp" -else - echo "No tmp directory found!" - exit 1 -fi - -#Create the command which creates a temporary directory -if [ -x "/usr/bin/mktemp" ] -then - INSTDIR=`/usr/bin/mktemp -d "$${UNOPKGTMP}/userinstall.XXXXXX"` -else - INSTDIR="$${UNOPKGTMP}/userinstall.$$$$" - mkdir "$$INSTDIR" -fi - # Use postrun command on Solaris where available (OpenSolaris) if [ -x $$PKG_INSTALL_ROOT/usr/lib/postrun ]; then ( echo "test -x \"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" || exit 0" echo "cd \"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program\"" echo "umask 022" - echo "\"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" sync \"-env:BUNDLED_EXTENSIONS_USER=file:////$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/share/prereg/bundled\" \"-env:UserInstallation=file:////$$INSTDIR\" '-env:UNO_JAVA_JFW_INSTALL_DATA=\$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'" + echo "\"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" sync" echo "find \"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/share/prereg/bundled\" -type f -exec chmod 644 {} \\;" - echo "rm -rf \"$$INSTDIR\"" ) | $$PKG_INSTALL_ROOT/usr/lib/postrun -c UNOPKG else # No postrun available, try running unopkg directly test -x $$BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg || exit 0 - "$$BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg" sync "-env:BUNDLED_EXTENSIONS_USER=file:////////$$BASEDIR/PRODUCTDIRECTORYNAME/share/prereg/bundled" "-env:UserInstallation=file:////////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1' + "$$BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg" sync echo "find \"$$BASEDIR/PRODUCTDIRECTORYNAME/share/prereg/bundled\" -type f -exec chmod 644 {} \\;" if [ "$$?" != "0" ]; then echo "\nERROR: Removal of UNO extension failed." @@ -109,9 +64,6 @@ else fi fi -if [ -n "$$INSTDIR" ]; then - rm -rf "$$INSTDIR" -fi exit 0 END @@ -121,151 +73,47 @@ END %format rpm %postinstall << END -#Find the temp dir -if [ -n "$$TMPDIR" ]; then - UNOPKGTMP="$$TMPDIR" -elif [ -n "$$TMP" ]; then - UNOPKGTMP="$$TMP" -elif [ -d "/tmp" ]; then - UNOPKGTMP="/tmp" -else - echo "No tmp directory found!" - exit 1 -fi - -#Create the command which creates a temporary directory -if [ -x "/bin/mktemp" ] -then - INSTDIR=`/bin/mktemp -d "$${UNOPKGTMP}/userinstall.XXXXXX"` -else - INSTDIR="$${UNOPKGTMP}/userinstall.$$$$" - mkdir "$$INSTDIR" -fi if [ -x "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" ]; then - "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" sync "-env:BUNDLED_EXTENSIONS_USER=file:////$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/share/prereg/bundled" "-env:UserInstallation=file:////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1' + "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" sync find "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/share/prereg/bundled" -type f -exec chmod 644 {} \; fi -if [ -n "$$INSTDIR" ]; then - rm -rf "$$INSTDIR" -fi - exit 0 END %postremove << END -#Find the temp dir -if [ -n "$$TMPDIR" ]; then - UNOPKGTMP="$$TMPDIR" -elif [ -n "$$TMP" ]; then - UNOPKGTMP="$$TMP" -elif [ -d "/tmp" ]; then - UNOPKGTMP="/tmp" -else - echo "No tmp directory found!" - exit 1 -fi - -#Create the command which creates a temporary directory -if [ -x "/bin/mktemp" ] -then - INSTDIR=`/bin/mktemp -d "$${UNOPKGTMP}/userinstall.XXXXXX"` -else - INSTDIR="$${UNOPKGTMP}/userinstall.$$$$" - mkdir "$$INSTDIR" -fi if [ -x "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" ]; then - "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" sync "-env:BUNDLED_EXTENSIONS_USER=file:////$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/share/prereg/bundled" "-env:UserInstallation=file:////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1' + "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" sync find "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/share/prereg/bundled" -type f -exec chmod 644 {} \; fi -if [ -n "$$INSTDIR" ]; then - rm -rf "$$INSTDIR" -fi - exit 0 END %format deb %postinstall << END -#Find the temp dir -if [ -n "$$TMPDIR" ] -then - UNOPKGTMP="$$TMPDIR" -elif [ -n "$$TMP" ] -then - UNOPKGTMP="$$TMP" -elif [ -d "/tmp" ] -then - UNOPKGTMP="/tmp" -else - echo "No tmp directory found!" - exit 1 -fi - -#Create the command which creates a temporary directory -if [ -x "/bin/mktemp" ] -then - INSTDIR=`/bin/mktemp -d "$${UNOPKGTMP}/userinstall.XXXXXX"` -else - INSTDIR="$${UNOPKGTMP}/userinstall.$$$$" - mkdir "$$INSTDIR" -fi if [ -x "PRODUCTDIRECTORYNAME/program/unopkg" ]; then - "PRODUCTDIRECTORYNAME/program/unopkg" sync "-env:BUNDLED_EXTENSIONS_USER=file://////PRODUCTDIRECTORYNAME/share/prereg/bundled" "-env:UserInstallation=file://////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1' + "PRODUCTDIRECTORYNAME/program/unopkg" sync find "PRODUCTDIRECTORYNAME/share/prereg/bundled" -type f -exec chmod 644 {} \; fi -if [ -n "$$INSTDIR" ] -then - rm -rf "$$INSTDIR" -fi - exit 0 END %postremove << END -# Find the temp dir -if [ -n "$$TMPDIR" ] -then - UNOPKGTMP="$$TMPDIR" -elif [ -n "$$TMP" ] -then - UNOPKGTMP="$$TMP" -elif [ -d "/tmp" ] -then - UNOPKGTMP="/tmp" -else - echo "No tmp directory found!" - exit 1 -fi - -#Create the command which creates a temporary directory -if [ -x "/bin/mktemp" ] -then - INSTDIR=`/bin/mktemp -d "$${UNOPKGTMP}/userinstall.XXXXXX"` -else - INSTDIR="$${UNOPKGTMP}/userinstall.$$$$" - mkdir "$$INSTDIR" -fi if [ -x "PRODUCTDIRECTORYNAME/program/unopkg" ] then - "PRODUCTDIRECTORYNAME/program/unopkg" sync "-env:BUNDLED_EXTENSIONS_USER=file://////PRODUCTDIRECTORYNAME/share/prereg/bundled" "-env:UserInstallation=file://////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1' + "PRODUCTDIRECTORYNAME/program/unopkg" sync find "PRODUCTDIRECTORYNAME/share/prereg/bundled" -type f -exec chmod 644 {} \; fi -if [ -n "$$INSTDIR" ] -then - rm -rf "$$INSTDIR" -fi - exit 0 END diff --git a/setup_native/source/win32/customactions/shellextensions/registerextensions.cxx b/setup_native/source/win32/customactions/shellextensions/registerextensions.cxx index c1aadd409..e14997adb 100644 --- a/setup_native/source/win32/customactions/shellextensions/registerextensions.cxx +++ b/setup_native/source/win32/customactions/shellextensions/registerextensions.cxx @@ -58,112 +58,112 @@ The returned string is a file URL. */ -static std::_tstring createTempFolder() -{ - BOOL bExist = FALSE; - TCHAR szTempName[MAX_PATH]; - do - { - bExist = FALSE; - // Get the temp path. - TCHAR lpPathBuffer[MAX_PATH]; - DWORD dwRetVal = GetTempPath(MAX_PATH, lpPathBuffer); - if (dwRetVal > MAX_PATH || (dwRetVal == 0)) - { - //fprintf (stderr, "GetTempPath failed with error %d.\n", GetLastError()); - return TEXT(""); - } - // Create a temporary file. - UINT uRetVal = GetTempFileName(lpPathBuffer, // directory for tmp files - "upg", // temp file name prefix - 0, // create unique name - szTempName); // buffer for name - if (uRetVal == 0) - { - //fprintf (stderr, "GetTempFileName failed with error %d.\n", GetLastError()); - return TEXT(""); - } - //Delete the file - BOOL bDel = DeleteFile(szTempName); - if (FALSE == bDel) - { - //fprintf(stderr, "Could not delete temp file. Error %d.\n", GetLastError()); - return TEXT(""); - } - // Create the directory - BOOL bDir = CreateDirectory(szTempName, NULL); - if (FALSE == bDir) - { - DWORD error =GetLastError(); - if (ERROR_ALREADY_EXISTS == error) - { - bExist = TRUE; - } - else - { - //fprintf(stderr, "CreateDirectory failed with error %d.\n", error); - return TEXT(""); - } - } - } while(bExist); +// static std::_tstring createTempFolder() +// { +// BOOL bExist = FALSE; +// TCHAR szTempName[MAX_PATH]; +// do +// { +// bExist = FALSE; +// // Get the temp path. +// TCHAR lpPathBuffer[MAX_PATH]; +// DWORD dwRetVal = GetTempPath(MAX_PATH, lpPathBuffer); +// if (dwRetVal > MAX_PATH || (dwRetVal == 0)) +// { +// //fprintf (stderr, "GetTempPath failed with error %d.\n", GetLastError()); +// return TEXT(""); +// } +// // Create a temporary file. +// UINT uRetVal = GetTempFileName(lpPathBuffer, // directory for tmp files +// "upg", // temp file name prefix +// 0, // create unique name +// szTempName); // buffer for name +// if (uRetVal == 0) +// { +// //fprintf (stderr, "GetTempFileName failed with error %d.\n", GetLastError()); +// return TEXT(""); +// } +// //Delete the file +// BOOL bDel = DeleteFile(szTempName); +// if (FALSE == bDel) +// { +// //fprintf(stderr, "Could not delete temp file. Error %d.\n", GetLastError()); +// return TEXT(""); +// } +// // Create the directory +// BOOL bDir = CreateDirectory(szTempName, NULL); +// if (FALSE == bDir) +// { +// DWORD error =GetLastError(); +// if (ERROR_ALREADY_EXISTS == error) +// { +// bExist = TRUE; +// } +// else +// { +// //fprintf(stderr, "CreateDirectory failed with error %d.\n", error); +// return TEXT(""); +// } +// } +// } while(bExist); - std::_tstring cur(szTempName); - //make a file URL from the path - std::_tstring ret(TEXT("file:///")); - for (std::_tstring::iterator i = cur.begin(); i != cur.end(); i++) - { - if (*i == '\\') - ret.append(TEXT("/")); - else - ret.push_back(*i); - } -// MessageBox(NULL, ret.c_str(), "createTempFolder", MB_OK); - return ret.c_str(); -} +// std::_tstring cur(szTempName); +// //make a file URL from the path +// std::_tstring ret(TEXT("file:///")); +// for (std::_tstring::iterator i = cur.begin(); i != cur.end(); i++) +// { +// if (*i == '\\') +// ret.append(TEXT("/")); +// else +// ret.push_back(*i); +// } +// // MessageBox(NULL, ret.c_str(), "createTempFolder", MB_OK); +// return ret.c_str(); +// } /** deletes the temporary folder. The argument must be a file URL. */ -static void deleteTempFolder(const std::_tstring& sTempFolder) -{ - if (sTempFolder.size() == 0) - return; - //convert the file URL to a path - const std::_tstring path(sTempFolder.substr(8)); - std::_tstring path2; -// MessageBox(NULL, path.c_str(), "del1", MB_OK); - for (std::_tstring::const_iterator i = path.begin(); i != path.end(); i++) - { - if (*i == '/') - path2.append(TEXT("\\")); - else - path2.push_back(*i); - } +// static void deleteTempFolder(const std::_tstring& sTempFolder) +// { +// if (sTempFolder.size() == 0) +// return; +// //convert the file URL to a path +// const std::_tstring path(sTempFolder.substr(8)); +// std::_tstring path2; +// // MessageBox(NULL, path.c_str(), "del1", MB_OK); +// for (std::_tstring::const_iterator i = path.begin(); i != path.end(); i++) +// { +// if (*i == '/') +// path2.append(TEXT("\\")); +// else +// path2.push_back(*i); +// } - //We need a null terminated string with two nulls in the end - //for the SHFILEOPSTRUCT - const TCHAR * szTemp = path2.c_str(); - size_t size = path2.size(); - TCHAR * szTemp2 = new TCHAR[size + 2]; - ZeroMemory(szTemp2, (size + 2) * sizeof(TCHAR)); - memcpy(szTemp2, szTemp, size * sizeof(TCHAR)); +// //We need a null terminated string with two nulls in the end +// //for the SHFILEOPSTRUCT +// const TCHAR * szTemp = path2.c_str(); +// size_t size = path2.size(); +// TCHAR * szTemp2 = new TCHAR[size + 2]; +// ZeroMemory(szTemp2, (size + 2) * sizeof(TCHAR)); +// memcpy(szTemp2, szTemp, size * sizeof(TCHAR)); -// MessageBox(NULL, szTemp2, "del3", MB_OK); - SHFILEOPSTRUCT operation = - { - NULL, - FO_DELETE, - szTemp2, - NULL, - FOF_SILENT | FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_NOCONFIRMMKDIR, - FALSE, - NULL, - NULL - }; - - SHFileOperation( &operation); - delete [] szTemp2; -} +// // MessageBox(NULL, szTemp2, "del3", MB_OK); +// SHFILEOPSTRUCT operation = +// { +// NULL, +// FO_DELETE, +// szTemp2, +// NULL, +// FOF_SILENT | FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_NOCONFIRMMKDIR, +// FALSE, +// NULL, +// NULL +// }; + +// SHFileOperation( &operation); +// delete [] szTemp2; +// } @@ -332,20 +332,12 @@ extern "C" UINT __stdcall RegisterExtensions(MSIHANDLE handle) if ( hFindUnopkg != INVALID_HANDLE_VALUE ) { // unopkg.exe exists in program directory - - const std::_tstring sTempFolder(createTempFolder()); - std::_tstring sCommandPart1 = sUnoPkgFile + " sync"; - std::_tstring sCommand = sCommandPart1 - + TEXT(" -env:BUNDLED_EXTENSIONS_USER=$BRAND_BASE_DIR/share/prereg/bundled") - + TEXT(" -env:UNO_JAVA_JFW_INSTALL_DATA=$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml") - + TEXT(" -env:UserInstallation=") + sTempFolder; + std::_tstring sCommand = sUnoPkgFile + " sync"; mystr = "Command: " + sCommand; //MessageBox(NULL, mystr.c_str(), "Command", MB_OK); DWORD exitCode = 0; bool fSuccess = ExecuteCommand( sCommand.c_str(), & exitCode); - - deleteTempFolder(sTempFolder); // if ( fSuccess ) // { diff --git a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx index eb9162e8b..6da9e70d8 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx +++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx @@ -895,7 +895,7 @@ Sequence< Reference < XCertificate > > SecurityEnvironment_MSCryptImpl :: buildC if (pChainContext) CertFreeCertificateChain(pChainContext); - return NULL ; + return Sequence< Reference < XCertificate > >(); } Reference< XCertificate > SecurityEnvironment_MSCryptImpl :: createCertificateFromRaw( const Sequence< sal_Int8 >& rawCertificate ) throw( SecurityException , RuntimeException ) { diff --git a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx index f5948d624..37812899c 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx +++ b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx @@ -206,7 +206,7 @@ sal_Int16 SAL_CALL X509Certificate_MSCryptImpl :: getVersion() throw ( ::com::su return serial ; } else { - return NULL ; + return Sequence< sal_Int8 >(); } } @@ -367,7 +367,7 @@ sal_Int16 SAL_CALL X509Certificate_MSCryptImpl :: getVersion() throw ( ::com::su return issuerUid ; } else { - return NULL ; + return Sequence< sal_Int8 >(); } } @@ -379,7 +379,7 @@ sal_Int16 SAL_CALL X509Certificate_MSCryptImpl :: getVersion() throw ( ::com::su return subjectUid ; } else { - return NULL ; + return Sequence< sal_Int8 >(); } } @@ -403,7 +403,7 @@ sal_Int16 SAL_CALL X509Certificate_MSCryptImpl :: getVersion() throw ( ::com::su return xExtns ; } else { - return NULL ; + return Sequence< Reference< XCertificateExtension > >(); } } @@ -443,7 +443,7 @@ sal_Int16 SAL_CALL X509Certificate_MSCryptImpl :: getVersion() throw ( ::com::su return rawCert ; } else { - return NULL ; + return Sequence< sal_Int8 >(); } } @@ -548,7 +548,7 @@ X509Certificate_MSCryptImpl* X509Certificate_MSCryptImpl :: getImplementation( c } } - return NULL; + return Sequence< sal_Int8 >(); } ::rtl::OUString SAL_CALL X509Certificate_MSCryptImpl::getSubjectPublicKeyAlgorithm() @@ -582,7 +582,7 @@ X509Certificate_MSCryptImpl* X509Certificate_MSCryptImpl :: getImplementation( c } else { - return NULL ; + return Sequence< sal_Int8 >(); } } diff --git a/xmlsecurity/test_docs/test_description.odt b/xmlsecurity/test_docs/test_description.odt Binary files differindex 45bbb5b0d..45bbb5b0d 100755..100644 --- a/xmlsecurity/test_docs/test_description.odt +++ b/xmlsecurity/test_docs/test_description.odt |