Kaydet (Commit) fe6913b9 authored tarafından Ricardo Montania's avatar Ricardo Montania Kaydeden (comit) Caolán McNamara

OUString cleanup and some identation

Change-Id: Id222047750b7527e35977b73213ceeb12a53b57a
Reviewed-on: https://gerrit.libreoffice.org/924Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 96ed67aa
...@@ -39,28 +39,28 @@ namespace basctl ...@@ -39,28 +39,28 @@ namespace basctl
// help methods for the general use: // help methods for the general use:
SbMethod* CreateMacro( SbModule* pModule, const String& rMacroName ); SbMethod* CreateMacro( SbModule* pModule, const String& rMacroName );
void RunMethod( SbMethod* pMethod ); void RunMethod( SbMethod* pMethod );
StarBASIC* FindBasic( const SbxVariable* pVar ); StarBASIC* FindBasic( const SbxVariable* pVar );
void StopBasic(); void StopBasic();
long HandleBasicError( StarBASIC* pBasic ); long HandleBasicError( StarBASIC* pBasic );
void BasicStopped( bool* pbAppWindowDisabled = 0, bool* pbDispatcherLocked = 0, sal_uInt16* pnWaitCount = 0, void BasicStopped( bool* pbAppWindowDisabled = 0, bool* pbDispatcherLocked = 0, sal_uInt16* pnWaitCount = 0,
SfxUInt16Item** ppSWActionCount = 0, SfxUInt16Item** ppSWLockViewCount = 0 ); SfxUInt16Item** ppSWActionCount = 0, SfxUInt16Item** ppSWLockViewCount = 0 );
bool IsValidSbxName( const String& rName ); bool IsValidSbxName( const String& rName );
BasicManager* FindBasicManager( StarBASIC* pLib ); BasicManager* FindBasicManager( StarBASIC* pLib );
SfxBindings* GetBindingsPtr(); SfxBindings* GetBindingsPtr();
SfxDispatcher* GetDispatcher (); SfxDispatcher* GetDispatcher ();
void InvalidateDebuggerSlots(); void InvalidateDebuggerSlots();
// libraries // libraries
::com::sun::star::uno::Sequence< ::rtl::OUString > GetMergedLibraryNames( ::com::sun::star::uno::Sequence< OUString > GetMergedLibraryNames(
const ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >& xModLibContainer, const ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >& xModLibContainer,
const ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >& xDlgLibContainer ); const ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >& xDlgLibContainer );
...@@ -68,21 +68,22 @@ namespace basctl ...@@ -68,21 +68,22 @@ namespace basctl
Will show an error message when renaming fails because the new name is already used. Will show an error message when renaming fails because the new name is already used.
*/ */
bool RenameModule( bool RenameModule(
Window* pErrorParent, const ScriptDocument& rDocument, Window* pErrorParent, const ScriptDocument& rDocument,
const ::rtl::OUString& rLibName, const ::rtl::OUString& rOldName, const ::rtl::OUString& rNewName ); const OUString& rLibName, const OUString& rOldName, const OUString& rNewName );
// new methods for macros // new methods for macros
::rtl::OUString ChooseMacro( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rxLimitToDocument, OUString ChooseMacro(
bool bChooseOnly, const ::rtl::OUString& rMacroDesc ); const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rxLimitToDocument,
bool bChooseOnly, const OUString& rMacroDesc );
::com::sun::star::uno::Sequence< ::rtl::OUString > GetMethodNames( ::com::sun::star::uno::Sequence< OUString > GetMethodNames(
const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rModName ) const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rModName )
throw( ::com::sun::star::container::NoSuchElementException ); throw( ::com::sun::star::container::NoSuchElementException );
bool HasMethod( bool HasMethod(
const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rModName, const ::rtl::OUString& rMethName ); const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rModName, const OUString& rMethName );
// new methods for dialogs // new methods for dialogs
...@@ -90,14 +91,13 @@ namespace basctl ...@@ -90,14 +91,13 @@ namespace basctl
Will show an error message when renaming fails because the new name is already used. Will show an error message when renaming fails because the new name is already used.
*/ */
bool RenameDialog( bool RenameDialog(
Window* pErrorParent, const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rOldName, const ::rtl::OUString& rNewName ) Window* pErrorParent, const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rOldName, const OUString& rNewName )
throw( ::com::sun::star::container::ElementExistException, ::com::sun::star::container::NoSuchElementException ); throw( ::com::sun::star::container::ElementExistException, ::com::sun::star::container::NoSuchElementException );
bool RemoveDialog( bool RemoveDialog( const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rDlgName );
const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rDlgName );
void MarkDocumentModified( const ScriptDocument& rDocument ); void MarkDocumentModified( const ScriptDocument& rDocument );
} // namespace basctl } // namespace basctl
......
...@@ -136,7 +136,7 @@ namespace basctl ...@@ -136,7 +136,7 @@ namespace basctl
@see getApplicationScriptDocument @see getApplicationScriptDocument
*/ */
static ScriptDocument static ScriptDocument
getDocumentWithURLOrCaption( const ::rtl::OUString& _rUrlOrCaption ); getDocumentWithURLOrCaption( const OUString& _rUrlOrCaption );
/** operation mode for getAllScriptDocuments /** operation mode for getAllScriptDocuments
*/ */
...@@ -232,7 +232,7 @@ namespace basctl ...@@ -232,7 +232,7 @@ namespace basctl
/** determines whether there exists a library of the given type, with the given name /** determines whether there exists a library of the given type, with the given name
*/ */
bool hasLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const; bool hasLibrary( LibraryContainerType _eType, const OUString& _rLibName ) const;
/** returns a script or dialog library given by name /** returns a script or dialog library given by name
...@@ -247,7 +247,7 @@ namespace basctl ...@@ -247,7 +247,7 @@ namespace basctl
if there is no script library with the given name if there is no script library with the given name
*/ */
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >
getLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName, bool _bLoadLibrary ) const getLibrary( LibraryContainerType _eType, const OUString& _rLibName, bool _bLoadLibrary ) const
SAL_THROW((::com::sun::star::container::NoSuchElementException)); SAL_THROW((::com::sun::star::container::NoSuchElementException));
/** creates a script or dialog library in the document, or returns an existing one /** creates a script or dialog library in the document, or returns an existing one
...@@ -256,24 +256,23 @@ namespace basctl ...@@ -256,24 +256,23 @@ namespace basctl
then this library will automatically be loaded, and then returned. then this library will automatically be loaded, and then returned.
*/ */
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >
getOrCreateLibrary( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const; getOrCreateLibrary( LibraryContainerType _eType, const OUString& _rLibName ) const;
/** returns the names of the modules in a given script or dialog library of the document /** returns the names of the modules in a given script or dialog library of the document
*/ */
::com::sun::star::uno::Sequence< ::rtl::OUString > ::com::sun::star::uno::Sequence< OUString >
getObjectNames( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const; getObjectNames( LibraryContainerType _eType, const OUString& _rLibName ) const;
/** retrieves a name for a newly to be created module or dialog /** retrieves a name for a newly to be created module or dialog
*/ */
::rtl::OUString OUString createObjectName( LibraryContainerType _eType, const OUString& _rLibName ) const;
createObjectName( LibraryContainerType _eType, const ::rtl::OUString& _rLibName ) const;
/** loads a script or dialog library given by name, if there is such a library /** loads a script or dialog library given by name, if there is such a library
*/ */
void loadLibraryIfExists( LibraryContainerType _eType, const ::rtl::OUString& _rLibrary ); void loadLibraryIfExists( LibraryContainerType _eType, const OUString& _rLibrary );
/// retrieves the (combined) names of all script and dialog libraries /// retrieves the (combined) names of all script and dialog libraries
::com::sun::star::uno::Sequence< ::rtl::OUString > ::com::sun::star::uno::Sequence< OUString >
getLibraryNames() const; getLibraryNames() const;
/** removes a given script module from the document /** removes a given script module from the document
...@@ -282,7 +281,7 @@ namespace basctl ...@@ -282,7 +281,7 @@ namespace basctl
<TRUE/> if and only if the removal was successful. When <FALSE/> is returned, <TRUE/> if and only if the removal was successful. When <FALSE/> is returned,
this will reported as assertion in a non-product build. this will reported as assertion in a non-product build.
*/ */
bool removeModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModuleName ) const; bool removeModule( const OUString& _rLibName, const OUString& _rModuleName ) const;
/** creates a module with the given name in the given library /** creates a module with the given name in the given library
@param _rLibName @param _rLibName
...@@ -296,7 +295,7 @@ namespace basctl ...@@ -296,7 +295,7 @@ namespace basctl
@return @return
<TRUE/> if and only if the creation was successful <TRUE/> if and only if the creation was successful
*/ */
bool createModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, bool _bCreateMain, ::rtl::OUString& _out_rNewModuleCode ) const; bool createModule( const OUString& _rLibName, const OUString& _rModName, bool _bCreateMain, OUString& _out_rNewModuleCode ) const;
/** inserts a given piece as code as module /** inserts a given piece as code as module
@param _rLibName @param _rLibName
...@@ -310,7 +309,7 @@ namespace basctl ...@@ -310,7 +309,7 @@ namespace basctl
@return @return
<TRUE/> if and only if the insertion was successful. <TRUE/> if and only if the insertion was successful.
*/ */
bool insertModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, const ::rtl::OUString& _rModuleCode ) const; bool insertModule( const OUString& _rLibName, const OUString& _rModName, const OUString& _rModuleCode ) const;
/** updates a given module with new code /** updates a given module with new code
@param _rLibName @param _rLibName
...@@ -322,10 +321,10 @@ namespace basctl ...@@ -322,10 +321,10 @@ namespace basctl
@return @return
<TRUE/> if and only if the insertion was successful. <TRUE/> if and only if the insertion was successful.
*/ */
bool updateModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, const ::rtl::OUString& _rModuleCode ) const; bool updateModule( const OUString& _rLibName, const OUString& _rModName, const OUString& _rModuleCode ) const;
/// determines whether a module with the given name exists in the given library /// determines whether a module with the given name exists in the given library
bool hasModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName ) const; bool hasModule( const OUString& _rLibName, const OUString& _rModName ) const;
/** retrieves a module's source /** retrieves a module's source
@param _rLibName @param _rLibName
...@@ -337,7 +336,7 @@ namespace basctl ...@@ -337,7 +336,7 @@ namespace basctl
@return @return
<TRUE/> if and only if the code could be successfully retrieved, <FALSE/> otherwise <TRUE/> if and only if the code could be successfully retrieved, <FALSE/> otherwise
*/ */
bool getModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rModName, ::rtl::OUString& _rModuleSource ) const; bool getModule( const OUString& _rLibName, const OUString& _rModName, OUString& _rModuleSource ) const;
/** renames a module /** renames a module
@param _rLibName @param _rLibName
...@@ -349,7 +348,7 @@ namespace basctl ...@@ -349,7 +348,7 @@ namespace basctl
@return @return
<TRUE/> if and only if renaming was successful. <TRUE/> if and only if renaming was successful.
*/ */
bool renameModule( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rOldName, const ::rtl::OUString& _rNewName ) const; bool renameModule( const OUString& _rLibName, const OUString& _rOldName, const OUString& _rNewName ) const;
/** removes a given dialog from the document /** removes a given dialog from the document
...@@ -357,10 +356,10 @@ namespace basctl ...@@ -357,10 +356,10 @@ namespace basctl
<TRUE/> if and only if the removal was successful. When <FALSE/> is returned, <TRUE/> if and only if the removal was successful. When <FALSE/> is returned,
this will reported as assertion in a non-product build. this will reported as assertion in a non-product build.
*/ */
bool removeDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rDialogName ) const; bool removeDialog( const OUString& _rLibName, const OUString& _rDialogName ) const;
/// determines whether a dialog with the given name exists in the given library /// determines whether a dialog with the given name exists in the given library
bool hasDialog( const ::rtl::OUString& _rLibName, const ::rtl::OUString& _rDialogName ) const; bool hasDialog( const OUString& _rLibName, const OUString& _rDialogName ) const;
/** retrieves a dialog /** retrieves a dialog
@param _rLibName @param _rLibName
...@@ -373,8 +372,8 @@ namespace basctl ...@@ -373,8 +372,8 @@ namespace basctl
<TRUE/> if and only if the dialog could be successfully retrieved, <FALSE/> otherwise <TRUE/> if and only if the dialog could be successfully retrieved, <FALSE/> otherwise
*/ */
bool getDialog( bool getDialog(
const ::rtl::OUString& _rLibName, const OUString& _rLibName,
const ::rtl::OUString& _rDialogName, const OUString& _rDialogName,
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStreamProvider >& _out_rDialogProvider ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStreamProvider >& _out_rDialogProvider
) const; ) const;
...@@ -391,9 +390,9 @@ namespace basctl ...@@ -391,9 +390,9 @@ namespace basctl
<TRUE/> if and only if renaming was successful. <TRUE/> if and only if renaming was successful.
*/ */
bool renameDialog( bool renameDialog(
const ::rtl::OUString& _rLibName, const OUString& _rLibName,
const ::rtl::OUString& _rOldName, const OUString& _rOldName,
const ::rtl::OUString& _rNewName, const OUString& _rNewName,
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& _rxExistingDialogModel const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& _rxExistingDialogModel
) const; ) const;
...@@ -408,8 +407,8 @@ namespace basctl ...@@ -408,8 +407,8 @@ namespace basctl
<TRUE/> if and only if the dialog could be successfully retrieved, <FALSE/> otherwise <TRUE/> if and only if the dialog could be successfully retrieved, <FALSE/> otherwise
*/ */
bool createDialog( bool createDialog(
const ::rtl::OUString& _rLibName, const OUString& _rLibName,
const ::rtl::OUString& _rDialogName, const OUString& _rDialogName,
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStreamProvider >& _out_rDialogProvider ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStreamProvider >& _out_rDialogProvider
) const; ) const;
...@@ -427,8 +426,8 @@ namespace basctl ...@@ -427,8 +426,8 @@ namespace basctl
<TRUE/> if and only if the insertion was successful. <TRUE/> if and only if the insertion was successful.
*/ */
bool insertDialog( bool insertDialog(
const ::rtl::OUString& _rLibName, const OUString& _rLibName,
const ::rtl::OUString& _rDialogName, const OUString& _rDialogName,
const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStreamProvider >& _rDialogProvider const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStreamProvider >& _rDialogProvider
) const; ) const;
...@@ -472,25 +471,22 @@ namespace basctl ...@@ -472,25 +471,22 @@ namespace basctl
/// returns the location of a library given by name /// returns the location of a library given by name
LibraryLocation LibraryLocation
getLibraryLocation( const ::rtl::OUString& _rLibName ) const; getLibraryLocation( const OUString& _rLibName ) const;
/// returns the title for the document /// returns the title for the document
::rtl::OUString OUString getTitle( LibraryLocation _eLocation, LibraryType _eType = LIBRARY_TYPE_ALL ) const;
getTitle( LibraryLocation _eLocation, LibraryType _eType = LIBRARY_TYPE_ALL ) const;
/** returns the title of the document /** returns the title of the document
to be used for valid documents only to be used for valid documents only
*/ */
::rtl::OUString OUString getTitle() const;
getTitle() const;
/** returns the URL of the document /** returns the URL of the document
to be used for valid documents only to be used for valid documents only
*/ */
::rtl::OUString OUString getURL() const;
getURL() const;
/** determines whether the document is currently the one-and-only application-wide active document /** determines whether the document is currently the one-and-only application-wide active document
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment