Kaydet (Commit) 721c4fc1 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Add ooo.vba.word.XWordBasic.WindowName() method

Change-Id: I0ff24c3bc331d55212855d79060eaa6f8f3dc013
Reviewed-on: https://gerrit.libreoffice.org/55705Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarTor Lillqvist <tml@collabora.com>
üst 939fc7dc
......@@ -15,6 +15,7 @@ module ooo { module vba { module word {
interface XWordBasic
{
void FileOpen( [in] string Name, [in] any ConfirmConversions, [in] any ReadOnly, [in] any AddToMru, [in] any PasswordDoc, [in] any PasswordDot, [in] any Revert, [in] any WritePasswordDoc, [in] any WritePasswordDot );
string WindowName();
};
}; }; };
......
......@@ -70,6 +70,7 @@ public:
// XWordBasic
virtual void SAL_CALL FileOpen( const OUString& Name, const uno::Any& ConfirmConversions, const uno::Any& ReadOnly, const uno::Any& AddToMru, const uno::Any& PasswordDoc, const uno::Any& PasswordDot, const uno::Any& Revert, const uno::Any& WritePasswordDoc, const uno::Any& WritePasswordDot ) override;
virtual OUString SAL_CALL WindowName() override;
};
SwVbaApplication::SwVbaApplication( uno::Reference<uno::XComponentContext >& xContext ):
......@@ -459,4 +460,10 @@ SwWordBasic::FileOpen( const OUString& Name, const uno::Any& ConfirmConversions,
rDocuments->Open( Name, ConfirmConversions, ReadOnly, AddToMru, PasswordDoc, PasswordDot, Revert, WritePasswordDoc, WritePasswordDot, uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any() );
}
OUString SAL_CALL
SwWordBasic::WindowName()
{
return mpApp->getActiveSwVbaWindow()->getCaption();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -49,7 +49,6 @@ typedef cppu::ImplInheritanceHelper< VbaApplicationBase, ooo::vba::word::XApplic
class SwVbaApplication : public SwVbaApplication_BASE
{
std::vector<css::uno::Reference< ooo::vba::XSink >> mvSinks;
SwVbaWindow* getActiveSwVbaWindow();
public:
explicit SwVbaApplication( css::uno::Reference< css::uno::XComponentContext >& m_xContext );
......@@ -58,6 +57,8 @@ public:
sal_uInt32 AddSink( const css::uno::Reference< ooo::vba::XSink >& xSink );
void RemoveSink( sal_uInt32 nNumber );
SwVbaWindow* getActiveSwVbaWindow();
// XApplication
virtual OUString SAL_CALL getName() override;
virtual css::uno::Reference< ooo::vba::word::XSystem > SAL_CALL getSystem() override;
......
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