diff options
author | Noel Grandin <noel@peralex.com> | 2013-05-02 10:36:43 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2013-05-22 10:44:29 +0000 |
commit | 6a043e9c0acff20e1618ca8ec15c21d5d0fd0d37 (patch) | |
tree | 2746468845d6f1159e3759ee2cf7a620fca15b6e /basctl/source/basicide/moduldl2.cxx | |
parent | 697a007c61b9cabceb9767fad87cd5822b300452 (diff) |
Use the new type-checking Reference constructor to reduce code noise
Also create a Clang compiler plugin to detect such cases.
Change-Id: I61ad1a1d6b1c017eeb51f226d2dde0e9bb7f1752
Reviewed-on: https://gerrit.libreoffice.org/4001
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'basctl/source/basicide/moduldl2.cxx')
-rw-r--r-- | basctl/source/basicide/moduldl2.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index 68b41ba53eb0..ae513291a8fb 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -802,8 +802,7 @@ void LibPage::InsertLib() aFilter += ";*.sdd;*.sxi;*.odp" ; // presentation aFilter += ";*.sti;*.otp" ; // presentation template aFilter += ";*.sxm;*.odf" ; // formula - Reference< XFilterManager > xFltMgr(xFP, UNO_QUERY); - xFltMgr->appendFilter( aTitle, aFilter ); + xFP->appendFilter( aTitle, aFilter ); // set display directory and filter OUString aPath(GetExtraData()->GetAddLibPath()); @@ -817,14 +816,14 @@ void LibPage::InsertLib() OUString aLastFilter(GetExtraData()->GetAddLibFilter()); if ( !aLastFilter.isEmpty() ) - xFltMgr->setCurrentFilter( aLastFilter ); + xFP->setCurrentFilter( aLastFilter ); else - xFltMgr->setCurrentFilter( IDE_RESSTR(RID_STR_BASIC) ); + xFP->setCurrentFilter( IDE_RESSTR(RID_STR_BASIC) ); if ( xFP->execute() == RET_OK ) { GetExtraData()->SetAddLibPath( xFP->getDisplayDirectory() ); - GetExtraData()->SetAddLibFilter( xFltMgr->getCurrentFilter() ); + GetExtraData()->SetAddLibFilter( xFP->getCurrentFilter() ); // library containers for import Reference< script::XLibraryContainer2 > xModLibContImport; @@ -1252,8 +1251,7 @@ void LibPage::ExportAsPackage( const String& aLibName ) OUString aTitle = String( IDEResId( RID_STR_PACKAGE_BUNDLE ) ); OUString aFilter; aFilter = "*.oxt" ; // library files - Reference< XFilterManager > xFltMgr(xFP, UNO_QUERY); - xFltMgr->appendFilter( aTitle, aFilter ); + xFP->appendFilter( aTitle, aFilter ); // set display directory and filter String aPath = GetExtraData()->GetAddLibPath(); @@ -1266,7 +1264,7 @@ void LibPage::ExportAsPackage( const String& aLibName ) // macro path from configuration management xFP->setDisplayDirectory( SvtPathOptions().GetWorkPath() ); } - xFltMgr->setCurrentFilter( aTitle ); + xFP->setCurrentFilter( aTitle ); if ( xFP->execute() == RET_OK ) { |