summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-12-23 13:16:31 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-12-26 14:51:15 +0100
commita3d0091d185f39eddabf4d372ebe0ac3061dbb89 (patch)
tree4d70cedc274972ccc21b6b8e7105f042090cf5d6 /basctl
parentaf791fb775e35c11ad01c42a7085dd121ab9c7a6 (diff)
New loplugin:stringliteralvar
See the comment at the top of compilerplugins/clang/stringliteralvar.cxx for details. (Turned some affected variables in included files into inline variables, to avoid GCC warnings about unused variables.) Change-Id: Ie77219e6adfdaaceaa8b4e590b08971f2f04c83a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/baside2.cxx2
-rw-r--r--basctl/source/basicide/baside3.cxx2
-rw-r--r--basctl/source/basicide/basides1.cxx10
-rw-r--r--basctl/source/basicide/localizationmgr.cxx2
-rw-r--r--basctl/source/dlged/dlged.cxx4
-rw-r--r--basctl/source/dlged/propbrw.cxx2
6 files changed, 12 insertions, 10 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 41c0ff4413f3..95768b0cfe54 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -93,7 +93,7 @@ short const ValidWindow = 0x1234;
#if defined(OW) || defined(MTF)
char const FilterMask_All[] = "*";
#else
-char const FilterMask_All[] = "*.*";
+OUStringLiteral const FilterMask_All = u"*.*";
#endif
} // end anonymous namespace
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index 063828689a0f..32dfa80c2baf 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -71,7 +71,7 @@ using namespace ::com::sun::star::ui::dialogs;
#ifdef _WIN32
char const FilterMask_All[] = "*.*";
#else
-char const FilterMask_All[] = "*";
+OUStringLiteral const FilterMask_All = u"*";
#endif
DialogWindow::DialogWindow(DialogWindowLayout* pParent, ScriptDocument const& rDocument,
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index d49060c0719d..7d931a70bad4 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -1209,10 +1209,12 @@ void Shell::SetCurWindow( BaseWindow* pNewWin, bool bUpdateTabBar, bool bRemembe
void Shell::ManageToolbars()
{
- static const char aMacroBarResName[] = "private:resource/toolbar/macrobar";
- static const char aDialogBarResName[] = "private:resource/toolbar/dialogbar";
- static const char aInsertControlsBarResName[] = "private:resource/toolbar/insertcontrolsbar";
- static const char aFormControlsBarResName[] = "private:resource/toolbar/formcontrolsbar";
+ static const OUStringLiteral aMacroBarResName = u"private:resource/toolbar/macrobar";
+ static const OUStringLiteral aDialogBarResName = u"private:resource/toolbar/dialogbar";
+ static const OUStringLiteral aInsertControlsBarResName
+ = u"private:resource/toolbar/insertcontrolsbar";
+ static const OUStringLiteral aFormControlsBarResName
+ = u"private:resource/toolbar/formcontrolsbar";
if( !pCurWin )
return;
diff --git a/basctl/source/basicide/localizationmgr.cxx b/basctl/source/basicide/localizationmgr.cxx
index 45c6239bc5c7..1e31f8a47d0f 100644
--- a/basctl/source/basicide/localizationmgr.cxx
+++ b/basctl/source/basicide/localizationmgr.cxx
@@ -74,7 +74,7 @@ bool LocalizationMgr::isLibraryLocalized ()
void LocalizationMgr::handleTranslationbar ()
{
- static const char aToolBarResName[] = "private:resource/toolbar/translationbar";
+ static const OUStringLiteral aToolBarResName = u"private:resource/toolbar/translationbar";
Reference< beans::XPropertySet > xFrameProps
( m_pShell->GetViewFrame()->GetFrame().GetFrameInterface(), uno::UNO_QUERY );
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 533e2381f3e7..ced23c5474bc 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -57,8 +57,8 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::io;
-const char aResourceResolverPropName[] = "ResourceResolver";
-const char aDecorationPropName[] = "Decoration";
+const OUStringLiteral aResourceResolverPropName = u"ResourceResolver";
+const OUStringLiteral aDecorationPropName = u"Decoration";
// DlgEdHint
diff --git a/basctl/source/dlged/propbrw.cxx b/basctl/source/dlged/propbrw.cxx
index 5ddf9ec154b1..73e90e2827ac 100644
--- a/basctl/source/dlged/propbrw.cxx
+++ b/basctl/source/dlged/propbrw.cxx
@@ -141,7 +141,7 @@ void PropBrw::ImplReCreateController()
// create a property browser controller
Reference< XMultiComponentFactory > xFactory( xInspectorContext->getServiceManager(), UNO_SET_THROW );
- static const char16_t s_sControllerServiceName[] = u"com.sun.star.awt.PropertyBrowserController";
+ static const OUStringLiteral s_sControllerServiceName = u"com.sun.star.awt.PropertyBrowserController";
m_xBrowserController.set( xFactory->createInstanceWithContext( s_sControllerServiceName, xInspectorContext ), UNO_QUERY );
if ( !m_xBrowserController.is() )
{