[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - 2 commits - oovbaapi/ooo sfx2/source sw/source
Tor Lillqvist (via logerrit)
logerrit at kemper.freedesktop.org
Fri Sep 20 11:51:19 UTC 2019
oovbaapi/ooo/vba/word/XWordBasic.idl | 10 +++++-----
sfx2/source/doc/docfile.cxx | 4 ++--
sw/source/ui/vba/vbaapplication.cxx | 32 ++++++++++++++++----------------
3 files changed, 23 insertions(+), 23 deletions(-)
New commits:
commit e14e265f5a2b3185af1a55c2f954fa426f7aee2d
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Tue Apr 2 14:02:51 2019 +0300
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Fri Sep 20 13:50:14 2019 +0200
Warn when getFileURLFromSystemPath() fails, not when it succeeds
Also, display the name that the call failed for in the warning message.
Change-Id: I0b6b7baca1d534b5bada5286b2b0e5b8e94f1832
(cherry picked from commit f65b120cc8ae83c8e90e8a786855a98b2d4d58c2)
Reviewed-on: https://gerrit.libreoffice.org/79200
Reviewed-by: Tor Lillqvist <tml at collabora.com>
Tested-by: Tor Lillqvist <tml at collabora.com>
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 789f3b8b8dae..793e5cb9a01d 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -753,9 +753,9 @@ bool SfxMedium::IsStorage()
{
OUString aURL;
if ( osl::FileBase::getFileURLFromSystemPath( pImpl->m_aName, aURL )
- == osl::FileBase::E_None )
+ != osl::FileBase::E_None )
{
- SAL_WARN( "sfx.doc", "Physical name not convertible!");
+ SAL_WARN( "sfx.doc", "Physical name '" << pImpl->m_aName << "' not convertible to file URL");
}
pImpl->bIsStorage = SotStorage::IsStorageFile( aURL ) && !SotStorage::IsOLEStorage( aURL);
if ( !pImpl->bIsStorage )
commit 86eb138f07e02290e208c75faaa161475291a11f
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Tue Apr 2 08:46:07 2019 +0300
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Fri Sep 20 13:49:45 2019 +0200
Change XWordBasic methods to return any
Possibly this is more in line with what callers expect.
Change-Id: Ie84b05a0bdb5ef1cb3e1f9fb7df6772831ff4980
(cherry picked from commit deb409861d677b8799c8120c29412d3d9e4a73b9)
Reviewed-on: https://gerrit.libreoffice.org/79199
Reviewed-by: Tor Lillqvist <tml at collabora.com>
Tested-by: Tor Lillqvist <tml at collabora.com>
diff --git a/oovbaapi/ooo/vba/word/XWordBasic.idl b/oovbaapi/ooo/vba/word/XWordBasic.idl
index 908c963d6978..40717488ce9f 100644
--- a/oovbaapi/ooo/vba/word/XWordBasic.idl
+++ b/oovbaapi/ooo/vba/word/XWordBasic.idl
@@ -20,8 +20,8 @@ interface XWordBasic
void FileSave();
void FileClose( [in] any Save );
void ToolsOptionsView( [in] any DraftFont, [in] any WrapToWindow, [in] any PicturePlaceHolders, [in] any FieldCodes, [in] any BookMarks, [in] any FieldShading, [in] any StatusBar, [in] any HScroll, [in] any VScroll, [in] any StyleAreaWidth, [in] any Tabs, [in] any Spaces, [in] any Paras, [in] any Hyphens, [in] any Hidden, [in] any ShowAll, [in] any Drawings, [in] any Anchors, [in] any TextBoundaries, [in] any VRuler, [in] any Highlight );
- string WindowName();
- boolean ExistingBookmark( [in] string Name );
+ any WindowName( [in] any Number );
+ any ExistingBookmark( [in] string Name );
void MailMergeOpenDataSource( [in] string Name,
[in] any Format,
[in] any ConfirmConversions,
@@ -39,10 +39,10 @@ interface XWordBasic
[in] any OpenExclusive,
[in] any SubType );
- long AppMaximize( [in] any WindowName, [in] any State );
- long DocMaximize( [in] any State );
+ any AppMaximize( [in] any WindowName, [in] any State );
+ any DocMaximize( [in] any State );
void AppShow( [in] any WindowName );
- long AppCount();
+ any AppCount();
};
}; }; };
diff --git a/sw/source/ui/vba/vbaapplication.cxx b/sw/source/ui/vba/vbaapplication.cxx
index 033b2cdb4432..b63bc413aff2 100644
--- a/sw/source/ui/vba/vbaapplication.cxx
+++ b/sw/source/ui/vba/vbaapplication.cxx
@@ -99,8 +99,8 @@ public:
const css::uno::Any& TextBoundaries,
const css::uno::Any& VRuler,
const css::uno::Any& Highlight ) override;
- virtual OUString SAL_CALL WindowName() override;
- virtual sal_Bool SAL_CALL ExistingBookmark( const OUString& Name ) override;
+ virtual css::uno::Any SAL_CALL WindowName( const css::uno::Any& Number ) override;
+ virtual css::uno::Any SAL_CALL ExistingBookmark( const OUString& Name ) override;
virtual void SAL_CALL MailMergeOpenDataSource(const OUString& Name, const css::uno::Any& Format,
const css::uno::Any& ConfirmConversions, const css::uno::Any& ReadOnly,
const css::uno::Any& LinkToSource, const css::uno::Any& AddToRecentFiles,
@@ -109,10 +109,10 @@ public:
const css::uno::Any& WritePasswordTemplate, const css::uno::Any& Connection,
const css::uno::Any& SQLStatement, const css::uno::Any& SQLStatement1,
const css::uno::Any& OpenExclusive, const css::uno::Any& SubType) override;
- virtual sal_Int32 SAL_CALL AppMaximize( const css::uno::Any& WindowName, const css::uno::Any& State ) override;
- virtual sal_Int32 SAL_CALL DocMaximize( const css::uno::Any& State ) override;
+ virtual css::uno::Any SAL_CALL AppMaximize( const css::uno::Any& WindowName, const css::uno::Any& State ) override;
+ virtual css::uno::Any SAL_CALL DocMaximize( const css::uno::Any& State ) override;
virtual void SAL_CALL AppShow( const css::uno::Any& WindowName ) override;
- virtual sal_Int32 SAL_CALL AppCount() override;
+ virtual css::uno::Any SAL_CALL AppCount() override;
};
SwVbaApplication::SwVbaApplication( uno::Reference<uno::XComponentContext >& xContext ):
@@ -619,17 +619,17 @@ SwWordBasic::ToolsOptionsView( const css::uno::Any& DraftFont,
<< ")");
}
-OUString SAL_CALL
-SwWordBasic::WindowName()
+css::uno::Any SAL_CALL
+SwWordBasic::WindowName( const css::uno::Any& /*Number*/ )
{
- return mpApp->getActiveSwVbaWindow()->getCaption();
+ return css::uno::makeAny( mpApp->getActiveSwVbaWindow()->getCaption() );
}
-sal_Bool SAL_CALL
+css::uno::Any SAL_CALL
SwWordBasic::ExistingBookmark( const OUString& Name )
{
uno::Reference< word::XBookmarks > xBookmarks( mpApp->getActiveDocument()->Bookmarks( uno::Any() ), uno::UNO_QUERY );
- return xBookmarks.is() && xBookmarks->Exists( Name );
+ return css::uno::makeAny( xBookmarks.is() && xBookmarks->Exists( Name ) );
}
void SAL_CALL
@@ -651,22 +651,22 @@ SwWordBasic::MailMergeOpenDataSource( const OUString& Name, const css::uno::Any&
OpenExclusive, SubType );
}
-sal_Int32 SAL_CALL
+css::uno::Any SAL_CALL
SwWordBasic::AppMaximize( const css::uno::Any& WindowName, const css::uno::Any& State )
{
SAL_INFO("sw.vba", "WordBasic.AppMaximize( WindowName:=" << WindowName << ", State:=" << State);
// FIXME: Implement if necessary
- return 0;
+ return css::uno::makeAny( sal_Int32(0) );
}
-sal_Int32 SAL_CALL
+css::uno::Any SAL_CALL
SwWordBasic::DocMaximize( const css::uno::Any& State )
{
SAL_INFO("sw.vba", "WordBasic.DocMaximize(State:=" << State << ")");
// FIXME: Implement if necessary
- return 0;
+ return css::uno::makeAny( sal_Int32(0) );
}
void SAL_CALL
@@ -677,13 +677,13 @@ SwWordBasic::AppShow( const css::uno::Any& WindowName )
// FIXME: Implement if necessary
}
-sal_Int32 SAL_CALL
+css::uno::Any SAL_CALL
SwWordBasic::AppCount()
{
SAL_INFO("sw.vba", "WordBasic.AppCount()");
// FIXME: Implement if necessary. Return a random number for now.
- return 2;
+ return css::uno::makeAny( sal_Int32(2) );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list