24#include <com/sun/star/frame/XTitle.hpp>
52 TextView* pEditView = pMCurWin->GetEditView();
64 if (
TextView* pEditView = pMCurWin->GetEditView())
66 if ( bWholeWord && !pEditView->HasSelection() )
68 aText = pEditView->GetTextEngine()->GetWord( pEditView->GetSelection().GetEnd() );
74 aText = pEditView->GetSelected();
86 assert(pDocShell &&
"DocShell ?!");
95 assert(pDocShell &&
"DocShell ?!");
114 aTitle +=
" " +
IDEResId(RID_STR_SIGNED) +
" ";
126 css::uno::Reference< css::frame::XTitle > xTitle (
xController, css::uno::UNO_QUERY);
128 xTitle->setTitle (aTitle);
138 OUString aLibName( rLibName );
139 OUString aModName( rModName );
141 if ( aLibName.isEmpty() )
142 aLibName =
"Standard" ;
146 if ( aModName.isEmpty() )
150 pWin =
FindBasWin( rDocument, aLibName, aModName,
false,
true );
155 bool bSuccess =
false;
156 if ( rDocument.
hasModule( aLibName, aModName ) )
157 bSuccess = rDocument.
getModule( aLibName, aModName, aModule );
159 bSuccess = rDocument.
createModule( aLibName, aModName,
true, aModule );
163 pWin =
FindBasWin( rDocument, aLibName, aModName,
false,
true );
180 DBG_ASSERT( nKey,
"CreateBasWin: No Key - Window not found!" );
188 if( !sObjName.isEmpty() )
190 aModName +=
" (" + sObjName +
")";
193 pTabBar->InsertPage( nKey, aModName );
207 OUString
const& rLibName, OUString
const& rName,
208 bool bCreateIfNotExist,
bool bFindSuspended
213 return bCreateIfNotExist ?
CreateBasWin(rDocument, rLibName, rName) :
nullptr;
223 pMCurWin->ShowCursor(bOn);
231 pCurWin->ExecuteCommand( rReq );
void SetTitle(const OUString &rTitle)
OUString GetTitle(sal_uInt16 nMaxLen=0) const
virtual void SetModified(bool bModified=true)
virtual SfxObjectShell * GetObjectShell() override
css::uno::Reference< css::frame::XController > GetController() const
SfxViewFrame & GetViewFrame() const
vcl::Window * GetWindow() const
sal_uInt32 GetPara() const
const TextPaM & GetStart() const
const TextPaM & GetEnd() const
bool HasSelection() const
reference_type * get() const
static VclPtr< reference_type > Create(Arg &&... arg)
SfxPrinter * GetPrinter(bool bCreate)
void SetPrinter(SfxPrinter *pPrinter)
encapsulates (actions on) the signature/state of a document
SignatureState getScriptingSignatureState() const
retrieves the state of the signature of the scripting content inside the document
static void getObjectName(const css::uno::Reference< css::container::XNameContainer > &rLib, const OUString &rModName, OUString &rObjName)
encapsulates a document which contains Basic scripts and dialogs
css::uno::Reference< css::container::XNameContainer > getOrCreateLibrary(LibraryContainerType _eType, const OUString &_rLibName) const
creates a script or dialog library in the document, or returns an existing one
OUString getTitle(LibraryLocation _eLocation, LibraryType _eType=LibraryType::All) const
returns the title for the document
bool getModule(const OUString &_rLibName, const OUString &_rModName, OUString &_rModuleSource) const
retrieves a module's source
bool createModule(const OUString &_rLibName, const OUString &_rModName, bool _bCreateMain, OUString &_out_rNewModuleCode) const
creates a module with the given name in the given library
bool hasModule(const OUString &_rLibName, const OUString &_rModName) const
determines whether a module with the given name exists in the given library
LibraryLocation getLibraryLocation(const OUString &_rLibName) const
returns the location of a library given by name
OUString createObjectName(LibraryContainerType _eType, const OUString &_rLibName) const
retrieves a name for a newly to be created module or dialog
virtual void ShowCursor(bool bOn=true) override
VclPtr< ModulWindow > FindBasWin(const ScriptDocument &rDocument, const OUString &rLibName, const OUString &rModName, bool bCreateIfNotExist=false, bool bFindSuspended=false)
virtual bool HasSelection(bool bText=true) const override
VclPtr< BaseWindow > FindWindow(const ScriptDocument &rDocument, std::u16string_view rLibName, std::u16string_view rName, ItemType nType, bool bFindSuspended=false)
sal_uInt16 GetWindowId(BaseWindow const *pWin) const
static unsigned nShellCount
VclPtr< ScrollAdaptor > aVScrollBar
VclPtr< ModulWindowLayout > pModulLayout
ScriptDocument m_aCurDocument
VclPtr< ModulWindow > CreateBasWin(const ScriptDocument &rDocument, const OUString &rLibName, const OUString &rModName)
virtual SfxPrinter * GetPrinter(bool bCreate=false) override
virtual sal_uInt16 SetPrinter(SfxPrinter *pNewPrinter, SfxPrinterChangeFlags nDiffFlags=SFX_PRINTER_ALL) override
VclPtr< ObjectCatalog > aObjectCatalog
VclPtr< ScrollAdaptor > aHScrollBar
void ExecuteBasic(SfxRequest &rReq)
virtual OUString GetSelectionText(bool bCompleteWords=false, bool bOnlyASample=false) override
virtual css::uno::Reference< css::view::XRenderable > GetRenderable() override
sal_uInt16 InsertWindowInTable(BaseWindow *pNewWin)
VclPtr< BaseWindow > pCurWin
void SetCurWindow(BaseWindow *pNewWin, bool bUpdateTabBar=false, bool bRememberAsCurrent=true)
virtual void Move() override
#define DBG_ASSERT(sCon, aError)
OUString IDEResId(TranslateId aId)
#define SFX_TITLE_CAPTION
Reference< XController > xController