From 6ea63bafb1e559ae6d0251de8220a430e090ac32 Mon Sep 17 00:00:00 2001 From: Kevin Hunter Date: Mon, 8 Nov 2010 03:57:20 -0500 Subject: [PATCH] Remove comment blocks, and other unnecessaries. --- basctl/source/basicide/baside3.cxx | 11 -- basctl/source/basicide/basides1.cxx | 6 +- basctl/source/basicide/basidesh.cxx | 13 +- basctl/source/basicide/localizationmgr.cxx | 50 +----- basctl/source/basicide/scriptdocument.cxx | 177 +++++++++------------ basctl/source/basicide/unomodel.cxx | 6 +- 6 files changed, 81 insertions(+), 182 deletions(-) diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 244440823169..543e9e620049 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -273,17 +273,6 @@ IMPL_LINK( DialogWindow, NotifyUndoActionHdl, SfxUndoAction *, pUndoAction ) { (void)pUndoAction; - // not working yet for unocontrols - /* - if (pUndoAction) - { - pUndoMgr->AddUndoAction( pUndoAction ); - SfxBindings* pBindings = BasicIDE::GetBindingsPtr(); - if ( pBindings ) - pBindings->Invalidate( SID_UNDO ); - } - */ - return 0; } diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx index 80928ca87ec5..f95fa69df59b 100644 --- a/basctl/source/basicide/basides1.cxx +++ b/basctl/source/basicide/basides1.cxx @@ -1257,10 +1257,7 @@ long BasicIDEShell::CallBasicBreakHdl( StarBASIC* pBasic ) { if ( bAppWindowDisabled ) Application::GetDefDialogParent()->Enable( FALSE ); - /* - if ( bDispatcherLocked ) - SFX_APP()->LockDispatcher( TRUE ); - */ + if ( nWaitCount ) { BasicIDEShell* pIDEShell = IDE_DLL()->GetShell(); @@ -1316,7 +1313,6 @@ void __EXPORT BasicIDEShell::AdjustPosSizePixel( const Point &rPos, const Size & return; Size aSz( rSize ); -// long nScrollbarWidthPixel = aVScrollBar.GetSizePixel().Width(); Size aScrollBarBoxSz( aScrollBarBox.GetSizePixel() ); aSz.Height() -= aScrollBarBoxSz.Height(); diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index 9b5d01636047..1c99be8dbee7 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -162,8 +162,6 @@ SFX_IMPL_NAMED_VIEWFACTORY( BasicIDEShell, "Default" ) } -// MI: Prinzipiel IDL, aber ich lieber doch nicht? -// SFX_IMPL_ /*IDL_*/ INTERFACE( BasicIDEShell, SfxViewShell, IDEResId( RID_STR_IDENAME ) ) SFX_IMPL_INTERFACE( BasicIDEShell, SfxViewShell, IDEResId( RID_STR_IDENAME ) ) { SFX_CHILDWINDOW_REGISTRATION( SID_SEARCH_DLG ); @@ -176,7 +174,6 @@ SFX_IMPL_INTERFACE( BasicIDEShell, SfxViewShell, IDEResId( RID_STR_IDENAME ) ) #define IDE_VIEWSHELL_FLAGS SFX_VIEW_CAN_PRINT|SFX_VIEW_NO_NEWWINDOW -// Hack for #101048 static sal_Int32 GnBasicIDEShellCount; sal_Int32 getBasicIDEShellCount( void ) { return GnBasicIDEShellCount; } @@ -288,10 +285,6 @@ __EXPORT BasicIDEShell::~BasicIDEShell() if ( pListener ) pListener->removeContainerListener( m_aCurDocument, m_aCurLibName ); - // MI: Das gab einen GPF im SDT beim Schliessen da dann der ViewFrame die - // 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; @@ -433,14 +426,11 @@ USHORT __EXPORT BasicIDEShell::PrepareClose( BOOL bUI, BOOL bForBrowsing ) } else { - // Hier unguenstig, wird zweimal gerufen... -// StoreAllWindowData(); - BOOL bCanClose = TRUE; for ( ULONG nWin = 0; bCanClose && ( nWin < aIDEWindowTable.Count() ); nWin++ ) { IDEBaseWindow* pWin = aIDEWindowTable.GetObject( nWin ); - if ( /* !pWin->IsSuspended() && */ !pWin->CanClose() ) + if ( !pWin->CanClose() ) { if ( m_aCurLibName.Len() && ( pWin->IsDocument( m_aCurDocument ) || pWin->GetLibName() != m_aCurLibName ) ) SetCurLib( ScriptDocument::getApplicationScriptDocument(), String(), false ); @@ -1061,5 +1051,4 @@ void BasicIDEShell::ImplStartListening( StarBASIC* pBasic ) StartListening( pBasic->GetBroadcaster(), TRUE /* Nur einmal anmelden */ ); } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basctl/source/basicide/localizationmgr.cxx b/basctl/source/basicide/localizationmgr.cxx index bd0259fe0637..2e57001dbf07 100644 --- a/basctl/source/basicide/localizationmgr.cxx +++ b/basctl/source/basicide/localizationmgr.cxx @@ -100,7 +100,6 @@ void LocalizationMgr::handleTranslationbar( void ) } -//============================================ // TODO: -> export from toolkit struct LanguageDependentProp @@ -136,7 +135,7 @@ bool isLanguageDependentProperty( ::rtl::OUString aName ) } return bRet; } -//============================================ + void LocalizationMgr::implEnableDisableResourceForAllLibraryDialogs( HandleResourceMode eMode ) { @@ -266,7 +265,6 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties ::rtl::OUString aPropIdStr = aEsc; aPropIdStr += aPureIdStr; // TODO?: Change here and in toolkit - //aPropIdStr += aSemi; (void)aSemi; aPropAny <<= aPropIdStr; xPropertySet->setPropertyValue( aPropName, aPropAny ); @@ -339,7 +337,6 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties ::rtl::OUString aPropIdStr = aEsc; aPropIdStr += aPureIdStr; // TODO?: Change here and in toolkit - //aPropIdStr += aSemi; (void)aSemi; aPropAny <<= aPropIdStr; xPropertySet->setPropertyValue( aPropName, aPropAny ); @@ -377,7 +374,6 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties ::rtl::OUString aPropIdStr = aEsc; aPropIdStr += aPureIdStr; // TODO?: Change here and in toolkit - //aPropIdStr += aSemi; (void)aSemi; aPropAny <<= aPropIdStr; xPropertySet->setPropertyValue( aPropName, aPropAny ); @@ -661,50 +657,6 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties return nChangedCount; } -/* -void TEST_simulateDialogAddRemoveLocale( bool bAdd ) -{ - Sequence< Locale > aLocaleSeq( 1 ); - Locale* pLocales = aLocaleSeq.getArray(); - - ::com::sun::star::lang::Locale aLocale_en; - aLocale_en.Language = ::rtl::OUString::createFromAscii( "en" ); - aLocale_en.Country = ::rtl::OUString::createFromAscii( "US" ); - - ::com::sun::star::lang::Locale aLocale_de; - aLocale_de.Language = ::rtl::OUString::createFromAscii( "de" ); - aLocale_de.Country = ::rtl::OUString::createFromAscii( "DE" ); - - ::com::sun::star::lang::Locale aLocale_fr; - aLocale_fr.Language = ::rtl::OUString::createFromAscii( "fr" ); - aLocale_fr.Country = ::rtl::OUString::createFromAscii( "FR" ); - - int n = 0; - if( n == 0 ) - pLocales[0] = aLocale_en; - else if( n == 1 ) - pLocales[0] = aLocale_de; - else if( n == 2 ) - pLocales[0] = aLocale_fr; - - BasicIDEShell* pIDEShell = IDE_DLL()->GetShell(); - LocalizationMgr* pMgr = pIDEShell->GetCurLocalizationMgr(); - if( bAdd ) - pMgr->handleAddLocales( aLocaleSeq ); - else - pMgr->handleRemoveLocales( aLocaleSeq ); -} - -void TEST_simulateDialogAddLocale( void ) -{ - TEST_simulateDialogAddRemoveLocale( true ); -} - -void TEST_simulateDialogRemoveLocale( void ) -{ - TEST_simulateDialogAddRemoveLocale( false ); -} -*/ void LocalizationMgr::handleAddLocales( Sequence< Locale > aLocaleSeq ) { diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx index bc21f4b3f556..21399fb5427a 100644 --- a/basctl/source/basicide/scriptdocument.cxx +++ b/basctl/source/basicide/scriptdocument.cxx @@ -95,12 +95,9 @@ #include #include -//........................................................................ + namespace basctl { -//........................................................................ - - /** === begin UNO using === **/ using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::Reference; using ::com::sun::star::frame::XModel; @@ -154,13 +151,11 @@ namespace basctl //==================================================================== namespace { - //................................................................ static bool StringCompareLessThan( const String& lhs, const String& rhs ) { return ( lhs.CompareIgnoreCaseToAscii( rhs ) == COMPARE_LESS ); } - //................................................................ class FilterDocuments : public docs::IDocumentDescriptorFilter { public: @@ -175,7 +170,6 @@ namespace basctl bool m_bFilterInvisible; }; - //................................................................ bool FilterDocuments::impl_isDocumentVisible_nothrow( const docs::DocumentDescriptor& _rDocument ) const { try @@ -198,7 +192,6 @@ namespace basctl return false; } - //................................................................ bool FilterDocuments::includeDocument( const docs::DocumentDescriptor& _rDocument ) const { Reference< XEmbeddedScripts > xScripts( _rDocument.xModel, UNO_QUERY ); @@ -209,7 +202,6 @@ namespace basctl return false; } - //................................................................ void lcl_getAllModels_throw( docs::Documents& _out_rModels, bool _bVisibleOnly ) { _out_rModels.clear(); @@ -222,9 +214,6 @@ namespace basctl } } - //==================================================================== - //= ScriptDocument_Impl - declaration - //==================================================================== class ScriptDocument_Impl : public DocumentEventListener { private: @@ -331,7 +320,6 @@ namespace basctl //==================================================================== //= ScriptDocument_Impl - implementation //==================================================================== - //-------------------------------------------------------------------- ScriptDocument_Impl::ScriptDocument_Impl() :m_bIsApplication( true ) ,m_bValid( true ) @@ -339,7 +327,6 @@ namespace basctl { } - //-------------------------------------------------------------------- ScriptDocument_Impl::ScriptDocument_Impl( const Reference< XModel >& _rxDocument ) :m_bIsApplication( false ) ,m_bValid( false ) @@ -353,13 +340,11 @@ namespace basctl } } - //-------------------------------------------------------------------- ScriptDocument_Impl::~ScriptDocument_Impl() { invalidate(); } - //-------------------------------------------------------------------- void ScriptDocument_Impl::invalidate() { m_bIsApplication = false; @@ -374,7 +359,6 @@ namespace basctl m_pDocListener->dispose(); } - //-------------------------------------------------------------------- bool ScriptDocument_Impl::impl_initDocument_nothrow( const Reference< XModel >& _rxModel ) { try @@ -401,7 +385,7 @@ namespace basctl return m_bValid; } - //-------------------------------------------------------------------- + Reference< XLibraryContainer > ScriptDocument_Impl::getLibraryContainer( LibraryContainerType _eType ) const { OSL_ENSURE( isValid(), "ScriptDocument_Impl::getLibraryContainer: invalid!" ); @@ -428,7 +412,6 @@ namespace basctl return xContainer; } - //-------------------------------------------------------------------- bool ScriptDocument_Impl::isReadOnly() const { OSL_ENSURE( isValid(), "ScriptDocument_Impl::isReadOnly: invalid state!" ); @@ -463,7 +446,7 @@ namespace basctl return bResult; } - //-------------------------------------------------------------------- + BasicManager* ScriptDocument_Impl::getBasicManager() const { OSL_ENSURE( isValid(), "ScriptDocument_Impl::getBasicManager: invalid state!" ); @@ -476,7 +459,7 @@ namespace basctl return ::basic::BasicManagerRepository::getDocumentBasicManager( m_xDocument ); } - //-------------------------------------------------------------------- + Reference< XModel > ScriptDocument_Impl::getDocument() const { OSL_ENSURE( isValid(), "ScriptDocument_Impl::getDocument: invalid state!" ); @@ -487,7 +470,7 @@ namespace basctl return m_xDocument; } - //-------------------------------------------------------------------- + Reference< XNameContainer > ScriptDocument_Impl::getLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, bool _bLoadLibrary ) const SAL_THROW((NoSuchElementException)) { @@ -522,7 +505,7 @@ namespace basctl return xContainer; } - //-------------------------------------------------------------------- + bool ScriptDocument_Impl::hasLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const { bool bHas = false; @@ -538,7 +521,7 @@ namespace basctl return bHas; } - //-------------------------------------------------------------------- + Reference< XNameContainer > ScriptDocument_Impl::getOrCreateLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const { Reference< XNameContainer > xLibrary; @@ -560,7 +543,7 @@ namespace basctl return xLibrary; } - //-------------------------------------------------------------------- + void ScriptDocument_Impl::loadLibraryIfExists( LibraryContainerType _eType, const ::rtl::OUString& _rLibrary ) { try @@ -575,7 +558,7 @@ namespace basctl } } - //-------------------------------------------------------------------- + bool ScriptDocument_Impl::removeModuleOrDialog( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModuleName ) { OSL_ENSURE( isValid(), "ScriptDocument_Impl::removeModuleOrDialog: invalid!" ); @@ -598,7 +581,7 @@ namespace basctl return false; } - //-------------------------------------------------------------------- + bool ScriptDocument_Impl::hasModuleOrDialog( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName ) const { OSL_ENSURE( isValid(), "ScriptDocument_Impl::hasModuleOrDialog: invalid!" ); @@ -618,7 +601,7 @@ namespace basctl return false; } - //-------------------------------------------------------------------- + bool ScriptDocument_Impl::getModuleOrDialog( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rObjectName, Any& _out_rModuleOrDialog ) { OSL_ENSURE( isValid(), "ScriptDocument_Impl::getModuleOrDialog: invalid!" ); @@ -642,7 +625,7 @@ namespace basctl return false; } - //-------------------------------------------------------------------- + bool ScriptDocument_Impl::renameModuleOrDialog( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rOldName, const ::rtl::OUString& _rNewName, const Reference< XNameContainer >& _rxExistingDialogModel ) { @@ -710,7 +693,7 @@ namespace basctl return false; } - //-------------------------------------------------------------------- + bool ScriptDocument_Impl::createModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, bool _bCreateMain, ::rtl::OUString& _out_rNewModuleCode ) const { _out_rNewModuleCode = ::rtl::OUString(); @@ -737,7 +720,7 @@ namespace basctl return true; } - //-------------------------------------------------------------------- + bool ScriptDocument_Impl::insertModuleOrDialog( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rObjectName, const Any& _rElement ) const { try @@ -756,7 +739,7 @@ namespace basctl return false; } - //-------------------------------------------------------------------- + bool ScriptDocument_Impl::updateModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, const ::rtl::OUString& _rModuleCode ) const { try @@ -774,7 +757,7 @@ namespace basctl return false; } - //-------------------------------------------------------------------- + bool ScriptDocument_Impl::createDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rDialogName, Reference< XInputStreamProvider >& _out_rDialogProvider ) const { try @@ -810,7 +793,7 @@ namespace basctl return _out_rDialogProvider.is(); } - //-------------------------------------------------------------------- + void ScriptDocument_Impl::setDocumentModified() const { OSL_ENSURE( isValid() && isDocument(), "ScriptDocument_Impl::setDocumentModified: only to be called for real documents!" ); @@ -827,7 +810,7 @@ namespace basctl } } - //-------------------------------------------------------------------- + bool ScriptDocument_Impl::isDocumentModified() const { OSL_ENSURE( isValid() && isDocument(), "ScriptDocument_Impl::isDocumentModified: only to be called for real documents!" ); @@ -846,7 +829,7 @@ namespace basctl return bIsModified; } - //-------------------------------------------------------------------- + bool ScriptDocument_Impl::saveDocument( const Reference< XStatusIndicator >& _rxStatusIndicator ) const { Reference< XFrame > xFrame; @@ -885,7 +868,7 @@ namespace basctl return true; } - //-------------------------------------------------------------------- + ::rtl::OUString ScriptDocument_Impl::getTitle() const { OSL_PRECOND( isValid() && isDocument(), "ScriptDocument_Impl::getTitle: for documents only!" ); @@ -898,7 +881,7 @@ namespace basctl return sTitle; } - //-------------------------------------------------------------------- + ::rtl::OUString ScriptDocument_Impl::getURL() const { OSL_PRECOND( isValid() && isDocument(), "ScriptDocument_Impl::getURL: for documents only!" ); @@ -918,7 +901,7 @@ namespace basctl return sURL; } - //-------------------------------------------------------------------- + bool ScriptDocument_Impl::allowMacros() const { OSL_ENSURE( isValid() && isDocument(), "ScriptDocument_Impl::allowMacros: for documents only!" ); @@ -937,7 +920,7 @@ namespace basctl return bAllow; } - //-------------------------------------------------------------------- + bool ScriptDocument_Impl::getCurrentFrame( Reference< XFrame >& _out_rxFrame ) const { _out_rxFrame.clear(); @@ -959,7 +942,7 @@ namespace basctl return _out_rxFrame.is(); } - //-------------------------------------------------------------------- + bool ScriptDocument_Impl::isLibraryShared( const ::rtl::OUString& _rLibName, LibraryContainerType _eType ) { bool bIsShared = false; @@ -1030,43 +1013,37 @@ namespace basctl return bIsShared; } - //-------------------------------------------------------------------- + void ScriptDocument_Impl::onDocumentCreated( const ScriptDocument& /*_rDocument*/ ) { // not interested in } - //-------------------------------------------------------------------- void ScriptDocument_Impl::onDocumentOpened( const ScriptDocument& /*_rDocument*/ ) { // not interested in } - //-------------------------------------------------------------------- void ScriptDocument_Impl::onDocumentSave( const ScriptDocument& /*_rDocument*/ ) { // not interested in } - //-------------------------------------------------------------------- void ScriptDocument_Impl::onDocumentSaveDone( const ScriptDocument& /*_rDocument*/ ) { // not interested in } - //-------------------------------------------------------------------- void ScriptDocument_Impl::onDocumentSaveAs( const ScriptDocument& /*_rDocument*/ ) { // not interested in } - //-------------------------------------------------------------------- void ScriptDocument_Impl::onDocumentSaveAsDone( const ScriptDocument& /*_rDocument*/ ) { // not interested in } - //-------------------------------------------------------------------- void ScriptDocument_Impl::onDocumentClosed( const ScriptDocument& _rDocument ) { DBG_TESTSOLARMUTEX(); @@ -1080,13 +1057,12 @@ namespace basctl } } - //-------------------------------------------------------------------- + void ScriptDocument_Impl::onDocumentTitleChanged( const ScriptDocument& /*_rDocument*/ ) { // not interested in } - //-------------------------------------------------------------------- void ScriptDocument_Impl::onDocumentModeChanged( const ScriptDocument& /*_rDocument*/ ) { // not interested in @@ -1095,13 +1071,12 @@ namespace basctl //==================================================================== //= ScriptDocument //==================================================================== - //-------------------------------------------------------------------- ScriptDocument::ScriptDocument() :m_pImpl( new ScriptDocument_Impl() ) { } - //-------------------------------------------------------------------- + ScriptDocument::ScriptDocument( ScriptDocument::SpecialDocument _eType ) :m_pImpl( new ScriptDocument_Impl( Reference< XModel >() ) ) { @@ -1109,7 +1084,7 @@ namespace basctl (void)_eType; } - //-------------------------------------------------------------------- + ScriptDocument::ScriptDocument( const Reference< XModel >& _rxDocument ) :m_pImpl( new ScriptDocument_Impl( _rxDocument ) ) { @@ -1118,25 +1093,25 @@ namespace basctl // purpose, there is a dedicated constructor } - //-------------------------------------------------------------------- + ScriptDocument::ScriptDocument( const ScriptDocument& _rSource ) :m_pImpl( _rSource.m_pImpl ) { } - //-------------------------------------------------------------------- + ScriptDocument::~ScriptDocument() { } - //-------------------------------------------------------------------- + const ScriptDocument& ScriptDocument::getApplicationScriptDocument() { static ScriptDocument s_aApplicationScripts; return s_aApplicationScripts; } - //-------------------------------------------------------------------- + ScriptDocument ScriptDocument::getDocumentForBasicManager( const BasicManager* _pManager ) { if ( _pManager == SFX_APP()->GetBasicManager() ) @@ -1163,7 +1138,7 @@ namespace basctl return ScriptDocument( NoDocument ); } - //-------------------------------------------------------------------- + ScriptDocument ScriptDocument::getDocumentWithURLOrCaption( const ::rtl::OUString& _rUrlOrCaption ) { ScriptDocument aDocument( getApplicationScriptDocument() ); @@ -1191,7 +1166,7 @@ namespace basctl return aDocument; } - //-------------------------------------------------------------------- + namespace { struct DocumentTitleLess : public ::std::binary_function< ScriptDocument, ScriptDocument, bool > @@ -1210,7 +1185,7 @@ namespace basctl }; } - //-------------------------------------------------------------------- + ScriptDocuments ScriptDocument::getAllScriptDocuments( ScriptDocument::ScriptDocumentList _eListType ) { ScriptDocuments aScriptDocs; @@ -1254,62 +1229,62 @@ namespace basctl return aScriptDocs; } - //-------------------------------------------------------------------- + bool ScriptDocument::operator==( const ScriptDocument& _rhs ) const { return m_pImpl->getDocumentRef() == _rhs.m_pImpl->getDocumentRef(); } - //-------------------------------------------------------------------- + sal_Int32 ScriptDocument::hashCode() const { return sal::static_int_cast(reinterpret_cast< sal_IntPtr >( m_pImpl->getDocumentRef().get() )); } - //-------------------------------------------------------------------- + bool ScriptDocument::isValid() const { return m_pImpl->isValid(); } - //-------------------------------------------------------------------- + bool ScriptDocument::isAlive() const { return m_pImpl->isAlive(); } - //-------------------------------------------------------------------- + Reference< XLibraryContainer > ScriptDocument::getLibraryContainer( LibraryContainerType _eType ) const { return m_pImpl->getLibraryContainer( _eType ); } - //-------------------------------------------------------------------- + Reference< XNameContainer > ScriptDocument::getLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, bool _bLoadLibrary ) const SAL_THROW((NoSuchElementException)) { return m_pImpl->getLibrary( _eType, _rLibName, _bLoadLibrary ); } - //-------------------------------------------------------------------- + bool ScriptDocument::hasLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const { return m_pImpl->hasLibrary( _eType, _rLibName ); } - //-------------------------------------------------------------------- + Reference< XNameContainer > ScriptDocument::getOrCreateLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const { return m_pImpl->getOrCreateLibrary( _eType, _rLibName ); } - //-------------------------------------------------------------------- + void ScriptDocument::loadLibraryIfExists( LibraryContainerType _eType, const ::rtl::OUString& _rLibrary ) { m_pImpl->loadLibraryIfExists( _eType, _rLibrary ); } - //-------------------------------------------------------------------- + Sequence< ::rtl::OUString > ScriptDocument::getObjectNames( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const { Sequence< ::rtl::OUString > aModuleNames; @@ -1334,7 +1309,7 @@ namespace basctl return aModuleNames; } - //-------------------------------------------------------------------- + ::rtl::OUString ScriptDocument::createObjectName( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const { ::rtl::OUString aObjectName; @@ -1364,19 +1339,19 @@ namespace basctl return aObjectName; } - //-------------------------------------------------------------------- + Sequence< ::rtl::OUString > ScriptDocument::getLibraryNames() const { return BasicIDE::GetMergedLibraryNames( getLibraryContainer( E_SCRIPTS ), getLibraryContainer( E_DIALOGS ) ); } - //-------------------------------------------------------------------- + bool ScriptDocument::isReadOnly() const { return m_pImpl->isReadOnly(); } - //-------------------------------------------------------------------- + bool ScriptDocument::isApplication() const { return m_pImpl->isApplication(); @@ -1387,19 +1362,19 @@ namespace basctl return m_pImpl->isInVBAMode(); } - //-------------------------------------------------------------------- + BasicManager* ScriptDocument::getBasicManager() const { return m_pImpl->getBasicManager(); } - //-------------------------------------------------------------------- + Reference< XModel > ScriptDocument::getDocument() const { return m_pImpl->getDocument(); } - //-------------------------------------------------------------------- + Reference< XModel > ScriptDocument::getDocumentOrNull() const { if ( isDocument() ) @@ -1407,19 +1382,19 @@ namespace basctl return NULL; } - //-------------------------------------------------------------------- + bool ScriptDocument::removeModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModuleName ) const { return m_pImpl->removeModuleOrDialog( E_SCRIPTS, _rLibName, _rModuleName ); } - //-------------------------------------------------------------------- + bool ScriptDocument::hasModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModuleName ) const { return m_pImpl->hasModuleOrDialog( E_SCRIPTS, _rLibName, _rModuleName ); } - //-------------------------------------------------------------------- + bool ScriptDocument::getModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, ::rtl::OUString& _out_rModuleSource ) const { Any aCode; @@ -1429,13 +1404,13 @@ namespace basctl return true; } - //-------------------------------------------------------------------- + bool ScriptDocument::renameModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rOldName, const ::rtl::OUString& _rNewName ) const { return m_pImpl->renameModuleOrDialog( E_SCRIPTS, _rLibName, _rOldName, _rNewName, NULL ); } - //-------------------------------------------------------------------- + bool ScriptDocument::createModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, bool _bCreateMain, ::rtl::OUString& _out_rNewModuleCode ) const { if ( !m_pImpl->createModule( _rLibName, _rModName, _bCreateMain, _out_rNewModuleCode ) ) @@ -1446,31 +1421,31 @@ namespace basctl return true; } - //-------------------------------------------------------------------- + bool ScriptDocument::insertModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, const ::rtl::OUString& _rModuleCode ) const { return m_pImpl->insertModuleOrDialog( E_SCRIPTS, _rLibName, _rModName, makeAny( _rModuleCode ) ); } - //-------------------------------------------------------------------- + bool ScriptDocument::updateModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, const ::rtl::OUString& _rModuleCode ) const { return m_pImpl->updateModule( _rLibName, _rModName, _rModuleCode ); } - //-------------------------------------------------------------------- + bool ScriptDocument::removeDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rDialogName ) const { return m_pImpl->removeModuleOrDialog( E_DIALOGS, _rLibName, _rDialogName ); } - //-------------------------------------------------------------------- + bool ScriptDocument::hasDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rDialogName ) const { return m_pImpl->hasModuleOrDialog( E_DIALOGS, _rLibName, _rDialogName ); } - //-------------------------------------------------------------------- + bool ScriptDocument::getDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rDialogName, Reference< XInputStreamProvider >& _out_rDialogProvider ) const { Any aCode; @@ -1480,13 +1455,13 @@ namespace basctl return _out_rDialogProvider.is(); } - //-------------------------------------------------------------------- + bool ScriptDocument::renameDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rOldName, const ::rtl::OUString& _rNewName, const Reference< XNameContainer >& _rxExistingDialogModel ) const { return m_pImpl->renameModuleOrDialog( E_DIALOGS, _rLibName, _rOldName, _rNewName, _rxExistingDialogModel ); } - //-------------------------------------------------------------------- + bool ScriptDocument::createDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rDialogName, Reference< XInputStreamProvider >& _out_rDialogProvider ) const { if ( !m_pImpl->createDialog( _rLibName, _rDialogName, _out_rDialogProvider ) ) @@ -1496,31 +1471,31 @@ namespace basctl return true; } - //-------------------------------------------------------------------- + bool ScriptDocument::insertDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rDialogName, const Reference< XInputStreamProvider >& _rxDialogProvider ) const { return m_pImpl->insertModuleOrDialog( E_DIALOGS, _rLibName, _rDialogName, makeAny( _rxDialogProvider ) ); } - //-------------------------------------------------------------------- + void ScriptDocument::setDocumentModified() const { m_pImpl->setDocumentModified(); } - //-------------------------------------------------------------------- + bool ScriptDocument::isDocumentModified() const { return m_pImpl->isDocumentModified(); } - //-------------------------------------------------------------------- + bool ScriptDocument::saveDocument( const Reference< XStatusIndicator >& _rxStatusIndicator ) const { return m_pImpl->saveDocument( _rxStatusIndicator ); } - //-------------------------------------------------------------------- + LibraryLocation ScriptDocument::getLibraryLocation( const ::rtl::OUString& _rLibName ) const { LibraryLocation eLocation = LIBRARY_LOCATION_UNKNOWN; @@ -1548,7 +1523,7 @@ namespace basctl return eLocation; } - //-------------------------------------------------------------------- + ::rtl::OUString ScriptDocument::getTitle( LibraryLocation _eLocation, LibraryType _eType ) const { ::rtl::OUString aTitle; @@ -1589,19 +1564,19 @@ namespace basctl return aTitle; } - //-------------------------------------------------------------------- + ::rtl::OUString ScriptDocument::getTitle() const { return m_pImpl->getTitle(); } - //-------------------------------------------------------------------- + ::rtl::OUString ScriptDocument::getURL() const { return m_pImpl->getURL(); } - //-------------------------------------------------------------------- + bool ScriptDocument::isActive() const { bool bIsActive( false ); @@ -1618,14 +1593,12 @@ namespace basctl return bIsActive; } - //-------------------------------------------------------------------- + bool ScriptDocument::allowMacros() const { return m_pImpl->allowMacros(); } -//........................................................................ -} // namespace basctl -//........................................................................ +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basctl/source/basicide/unomodel.cxx b/basctl/source/basicide/unomodel.cxx index ab61423b9314..76b3057b6409 100644 --- a/basctl/source/basicide/unomodel.cxx +++ b/basctl/source/basicide/unomodel.cxx @@ -97,12 +97,12 @@ OUString SIDEModel::getImplementationName(void) throw( uno::RuntimeException ) ::rtl::OUString SIDEModel::getImplementationName_Static() { - return rtl::OUString::createFromAscii("com.sun.star.comp.basic.BasicIDE"); + return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.basic.BasicIDE" )); } sal_Bool SIDEModel::supportsService(const OUString& rServiceName) throw( uno::RuntimeException ) { - return rServiceName == ::rtl::OUString::createFromAscii("com.sun.star.script.BasicIDE"); + return rServiceName == ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.script.BasicIDE" )); } uno::Sequence< OUString > SIDEModel::getSupportedServiceNames(void) throw( uno::RuntimeException ) { @@ -113,7 +113,7 @@ uno::Sequence< OUString > SIDEModel::getSupportedServiceNames_Static(void) { uno::Sequence< OUString > aRet(1); OUString* pArray = aRet.getArray(); - pArray[0] = ::rtl::OUString::createFromAscii("com.sun.star.script.BasicIDE"); + pArray[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.script.BasicIDE" )); return aRet; }