summaryrefslogtreecommitdiff
path: root/extensions/source/dbpilots/gridwizard.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/source/dbpilots/gridwizard.cxx')
-rw-r--r--extensions/source/dbpilots/gridwizard.cxx33
1 files changed, 16 insertions, 17 deletions
diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx
index 1c5f568795e0..4b382e228264 100644
--- a/extensions/source/dbpilots/gridwizard.cxx
+++ b/extensions/source/dbpilots/gridwizard.cxx
@@ -40,7 +40,6 @@ namespace dbp
using namespace ::com::sun::star::uno;
- using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::container;
@@ -93,8 +92,8 @@ namespace dbp
if (!xColumnFactory.is() || !xColumnContainer.is())
return;
- static constexpr OUStringLiteral s_sMouseWheelBehavior = u"MouseWheelBehavior";
- static constexpr OUStringLiteral s_sEmptyString = u"";
+ static constexpr OUString s_sMouseWheelBehavior = u"MouseWheelBehavior"_ustr;
+ static constexpr OUString s_sEmptyString = u""_ustr;
// collect "descriptors" for the to-be-created (grid)columns
std::vector< OUString > aColumnServiceNames; // service names to be used with the XGridColumnFactory
@@ -121,14 +120,14 @@ namespace dbp
{
case DataType::BIT:
case DataType::BOOLEAN:
- aColumnServiceNames.push_back(OUString("CheckBox"));
+ aColumnServiceNames.emplace_back("CheckBox");
aColumnLabelPostfixes.push_back(s_sEmptyString);
break;
case DataType::TINYINT:
case DataType::SMALLINT:
case DataType::INTEGER:
- aColumnServiceNames.push_back(OUString("NumericField"));
+ aColumnServiceNames.emplace_back("NumericField");
aColumnLabelPostfixes.push_back(s_sEmptyString);
break;
@@ -137,31 +136,31 @@ namespace dbp
case DataType::DOUBLE:
case DataType::NUMERIC:
case DataType::DECIMAL:
- aColumnServiceNames.push_back(OUString("FormattedField"));
+ aColumnServiceNames.emplace_back("FormattedField");
aColumnLabelPostfixes.push_back(s_sEmptyString);
break;
case DataType::DATE:
- aColumnServiceNames.push_back(OUString("DateField"));
+ aColumnServiceNames.emplace_back("DateField");
aColumnLabelPostfixes.push_back(s_sEmptyString);
break;
case DataType::TIME:
- aColumnServiceNames.push_back(OUString("TimeField"));
+ aColumnServiceNames.emplace_back("TimeField");
aColumnLabelPostfixes.push_back(s_sEmptyString);
break;
case DataType::TIMESTAMP:
- aColumnServiceNames.push_back(OUString("DateField"));
+ aColumnServiceNames.emplace_back("DateField");
aColumnLabelPostfixes.push_back(compmodule::ModuleRes(RID_STR_DATEPOSTFIX));
aFormFieldNames.push_back(*pSelectedFields);
- aColumnServiceNames.push_back(OUString("TimeField"));
+ aColumnServiceNames.emplace_back("TimeField");
aColumnLabelPostfixes.push_back(compmodule::ModuleRes(RID_STR_TIMEPOSTFIX));
break;
default:
- aColumnServiceNames.push_back(OUString("TextField"));
+ aColumnServiceNames.emplace_back("TextField");
aColumnLabelPostfixes.push_back(s_sEmptyString);
}
}
@@ -172,7 +171,7 @@ namespace dbp
// now loop through the descriptions and create the (grid)columns out of th descriptors
{
- Reference< XNameAccess > xExistenceChecker(xColumnContainer.get());
+ Reference< XNameAccess > xExistenceChecker(xColumnContainer);
std::vector< OUString >::const_iterator pColumnLabelPostfix = aColumnLabelPostfixes.begin();
std::vector< OUString >::const_iterator pFormFieldName = aFormFieldNames.begin();
@@ -189,17 +188,17 @@ namespace dbp
disambiguateName(xExistenceChecker, sColumnName);
// the data field the column should be bound to
- xColumn->setPropertyValue("DataField", makeAny(*pFormFieldName));
+ xColumn->setPropertyValue("DataField", Any(*pFormFieldName));
// the label
- xColumn->setPropertyValue("Label", makeAny(*pFormFieldName + *pColumnLabelPostfix));
+ xColumn->setPropertyValue("Label", Any(*pFormFieldName + *pColumnLabelPostfix));
// the width (<void/> => column will be auto-sized)
xColumn->setPropertyValue("Width", Any());
if ( xColumnPSI->hasPropertyByName( s_sMouseWheelBehavior ) )
- xColumn->setPropertyValue( s_sMouseWheelBehavior, makeAny( MouseWheelBehavior::SCROLL_DISABLED ) );
+ xColumn->setPropertyValue( s_sMouseWheelBehavior, Any( MouseWheelBehavior::SCROLL_DISABLED ) );
// insert the column
- xColumnContainer->insertByName(sColumnName, makeAny(xColumn));
+ xColumnContainer->insertByName(sColumnName, Any(xColumn));
}
catch(const Exception&)
{
@@ -216,7 +215,7 @@ namespace dbp
std::unique_ptr<BuilderPage> OGridWizard::createPage(WizardState _nState)
{
- OString sIdent(OString::number(_nState));
+ OUString sIdent(OUString::number(_nState));
weld::Container* pPageContainer = m_xAssistant->append_page(sIdent);
switch (_nState)