diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-19 16:02:12 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-20 07:50:06 +0200 |
commit | 6ee9f2c188290ba8a8bc6d435f645b31a05783ea (patch) | |
tree | 60a58e7c8995d64f3b22cf228480284172b6a17c /basctl | |
parent | 9c2b43e86fbb7612a58f6e55bc429f674977d6dd (diff) |
loplugin:oncevar accessibility..basic
Change-Id: I8fb41b658ef0f6ad1774ea897eace3dc9bb12de6
Reviewed-on: https://gerrit.libreoffice.org/38969
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/baside2.cxx | 3 | ||||
-rw-r--r-- | basctl/source/basicide/baside2b.cxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/baside3.cxx | 6 | ||||
-rw-r--r-- | basctl/source/basicide/basides1.cxx | 6 | ||||
-rw-r--r-- | basctl/source/basicide/scriptdocument.cxx | 9 | ||||
-rw-r--r-- | basctl/source/dlged/dlgedobj.cxx | 4 |
6 files changed, 10 insertions, 20 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index b18a1bb6b664..9219cde9e7cf 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -810,7 +810,6 @@ sal_Int32 ModulWindow::FormatAndPrint( Printer* pPrinter, sal_Int32 nPrintPage ) { nLineHeight = 1; } - sal_Int32 nParaSpace = 10; Size aPaperSz = pPrinter->GetOutputSize(); aPaperSz.Width() -= (Print::nLeftMargin + Print::nRightMargin); @@ -848,7 +847,7 @@ sal_Int32 ModulWindow::FormatAndPrint( Printer* pPrinter, sal_Int32 nPrintPage ) if( nCurPage-1 == nPrintPage ) pPrinter->DrawText( aPos, aTmpLine ); } - aPos.Y() += nParaSpace; + aPos.Y() += 10; // nParaSpace } pPrinter->SetFont( aOldFont ); diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 825d5ffc70f3..b4e449b99fa9 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -1596,7 +1596,7 @@ WatchWindow::WatchWindow (Layout* pParent) long nVarTabWidth = 220; long nValueTabWidth = 100; - long nTypeTabWidth = 1250; + long const nTypeTabWidth = 1250; aHeaderBar->InsertItem( ITEM_ID_VARIABLE, IDEResId(RID_STR_WATCHVARIABLE), nVarTabWidth ); aHeaderBar->InsertItem( ITEM_ID_VALUE, IDEResId(RID_STR_WATCHVALUE), nValueTabWidth ); aHeaderBar->InsertItem( ITEM_ID_TYPE, IDEResId(RID_STR_WATCHTYPE), nTypeTabWidth ); diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index affd163b25ce..ddf2113b3fe3 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -676,7 +676,6 @@ void DialogWindow::SaveDialog() OUString aDialogName( aURLObj.getName() ); aURLObj.removeSegment(); OUString aURL( aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ); - bool bReadOnly = false; OUString aComment = "# " + aDialogName + " strings" ; Reference< task::XInteractionHandler > xDummyHandler; @@ -719,7 +718,7 @@ void DialogWindow::SaveDialog() } Reference< XStringResourceWithLocation > xStringResourceWithLocation = - StringResourceWithLocation::create( xContext, aURL, bReadOnly, + StringResourceWithLocation::create( xContext, aURL, false/*bReadOnly*/, xStringResourceResolver->getDefaultLocale(), aDialogName, aComment, xDummyHandler ); // Add locales @@ -941,9 +940,8 @@ bool implImportDialog( vcl::Window* pWin, const OUString& rCurPath, const Script // Resource? css::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale(); Reference< task::XInteractionHandler > xDummyHandler; - bool bReadOnly = true; Reference< XStringResourceWithLocation > xImportStringResource = - StringResourceWithLocation::create( xContext, aBasePath, bReadOnly, + StringResourceWithLocation::create( xContext, aBasePath, true/*bReadOnly*/, aLocale, aXmlDlgName, OUString(), xDummyHandler ); Sequence< lang::Locale > aImportLocaleSeq = xImportStringResource->getLocales(); diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx index 61be4c544eed..a1c9304139ec 100644 --- a/basctl/source/basicide/basides1.cxx +++ b/basctl/source/basicide/basides1.cxx @@ -591,7 +591,6 @@ void Shell::ExecuteGlobal( SfxRequest& rReq ) { OUString aName( pNameItem->GetValue() ); OUString aModType( "Module" ); - OUString aDlgType( "Dialog" ); OUString aType( aModType ); const SfxStringItem* pTypeItem = rReq.GetArg<SfxStringItem>(SID_BASICIDE_ARG_TYPE); if ( pTypeItem ) @@ -600,7 +599,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq ) BaseWindow* pWin = nullptr; if ( aType == aModType ) pWin = FindBasWin( *pDocument, aLibName, aName ); - else if ( aType == aDlgType ) + else if ( aType == "Dialog" ) pWin = FindDlgWin( *pDocument, aLibName, aName ); if ( pWin ) @@ -873,8 +872,7 @@ void Shell::GetState(SfxItemSet &rSet) break; case SID_BASICIDE_STAT_DATE: { - OUString aDate( "Datum?!" ); - SfxStringItem aItem( SID_BASICIDE_STAT_DATE, aDate ); + SfxStringItem aItem( SID_BASICIDE_STAT_DATE, "Datum?!" ); rSet.Put( aItem ); } break; diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx index f85c8ad4a800..abbb47cad672 100644 --- a/basctl/source/basicide/scriptdocument.cxx +++ b/basctl/source/basicide/scriptdocument.cxx @@ -953,12 +953,9 @@ namespace basctl OSL_VERIFY( aFileItem.getFileStatus( aFileStatus ) == ::osl::FileBase::E_None ); OUString aCanonicalFileURL( aFileStatus.getFileURL() ); - OUString aSearchURL1( "share/basic" ); - OUString aSearchURL2( "share/uno_packages" ); - OUString aSearchURL3( "share/extensions" ); - if( aCanonicalFileURL.indexOf( aSearchURL1 ) >= 0 || - aCanonicalFileURL.indexOf( aSearchURL2 ) >= 0 || - aCanonicalFileURL.indexOf( aSearchURL3 ) >= 0 ) + if( aCanonicalFileURL.indexOf( "share/basic" ) >= 0 || + aCanonicalFileURL.indexOf( "share/uno_packages" ) >= 0 || + aCanonicalFileURL.indexOf( "share/extensions" ) >= 0 ) bIsShared = true; } } diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx index 8c9f8a9431c7..257d17ec33f7 100644 --- a/basctl/source/dlged/dlgedobj.cxx +++ b/basctl/source/dlged/dlgedobj.cxx @@ -381,13 +381,11 @@ void DlgEdObj::PositionAndSizeChange( const beans::PropertyChangeEvent& evt ) DBG_ASSERT( pDlgEdForm, "DlgEdObj::PositionAndSizeChange: no form!" ); DlgEdPage& rPage = pDlgEdForm->GetDlgEditor().GetPage(); { - sal_Int32 nPageXIn = 0; - sal_Int32 nPageYIn = 0; Size aPageSize = rPage.GetSize(); sal_Int32 nPageWidthIn = aPageSize.Width(); sal_Int32 nPageHeightIn = aPageSize.Height(); sal_Int32 nPageX, nPageY, nPageWidth, nPageHeight; - if ( TransformSdrToControlCoordinates( nPageXIn, nPageYIn, nPageWidthIn, nPageHeightIn, nPageX, nPageY, nPageWidth, nPageHeight ) ) + if ( TransformSdrToControlCoordinates( 0/*nPageXIn*/, 0/*nPageYIn*/, nPageWidthIn, nPageHeightIn, nPageX, nPageY, nPageWidth, nPageHeight ) ) { Reference< beans::XPropertySet > xPSet( GetUnoControlModel(), UNO_QUERY ); if ( xPSet.is() ) |