summaryrefslogtreecommitdiffstats
path: root/dbaccess/source/ui/dlg/dbfindex.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/dlg/dbfindex.cxx')
-rw-r--r--dbaccess/source/ui/dlg/dbfindex.cxx19
1 files changed, 8 insertions, 11 deletions
diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx
index d12688d2cbd8..35db6e446ee4 100644
--- a/dbaccess/source/ui/dlg/dbfindex.cxx
+++ b/dbaccess/source/ui/dlg/dbfindex.cxx
@@ -29,6 +29,7 @@
#include <ucbhelper/content.hxx>
#include <svl/filenotation.hxx>
#include <rtl/strbuf.hxx>
+#include <utility>
namespace dbaui
{
@@ -36,12 +37,12 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::ucb;
using namespace ::svt;
-constexpr OStringLiteral aGroupIdent("dBase III");
+constexpr OString aGroupIdent("dBase III"_ostr);
-ODbaseIndexDialog::ODbaseIndexDialog(weld::Window * pParent, const OUString& aDataSrcName)
+ODbaseIndexDialog::ODbaseIndexDialog(weld::Window * pParent, OUString aDataSrcName)
: GenericDialogController(pParent, "dbaccess/ui/dbaseindexdialog.ui", "DBaseIndexDialog")
- , m_aDSN(aDataSrcName)
+ , m_aDSN(std::move(aDataSrcName))
, m_xPB_OK(m_xBuilder->weld_button("ok"))
, m_xCB_Tables(m_xBuilder->weld_combo_box("table"))
, m_xIndexes(m_xBuilder->weld_widget("frame"))
@@ -253,9 +254,6 @@ void ODbaseIndexDialog::Init()
// first assume for all indexes they're free
- OUString const aIndexExt("ndx");
- OUString const aTableExt("dbf");
-
std::vector< OUString > aUsedIndexes;
aURL.SetSmartProtocol(INetProtocol::File);
@@ -266,11 +264,11 @@ void ODbaseIndexDialog::Init()
osl::FileBase::getSystemPathFromFileURL(rURL,aName);
aURL.SetSmartURL(aName);
OUString aExt = aURL.getExtension();
- if (aExt == aIndexExt)
+ if (aExt == "ndx")
{
m_aFreeIndexList.emplace_back(aURL.getName() );
}
- else if (aExt == aTableExt)
+ else if (aExt == "dbf")
{
m_aTableInfoList.emplace_back(aURL.getName() );
OTableInfo& rTabInfo = m_aTableInfoList.back();
@@ -370,7 +368,6 @@ void OTableInfo::WriteInfFile( const OUString& rDSN ) const
aInfFile.SetGroup( aGroupIdent );
// first, delete all table indices
- OString aNDX;
sal_uInt16 nKeyCnt = aInfFile.GetKeyCount();
sal_uInt16 nKey = 0;
@@ -378,7 +375,7 @@ void OTableInfo::WriteInfFile( const OUString& rDSN ) const
{
// Does the key point to an index file?...
OString aKeyName = aInfFile.GetKeyName( nKey );
- aNDX = aKeyName.copy(0,3);
+ OString aNDX = aKeyName.copy(0,3);
//...if yes, delete index file, nKey is at subsequent key
if (aNDX == "NDX")
@@ -414,7 +411,7 @@ void OTableInfo::WriteInfFile( const OUString& rDSN ) const
try
{
::ucbhelper::Content aContent(aURL.GetURLNoPass(),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext());
- aContent.executeCommand( "delete", makeAny( true ) );
+ aContent.executeCommand( "delete", Any( true ) );
}
catch (const Exception& )
{