summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui')
-rw-r--r--dbaccess/source/ui/app/AppController.cxx13
-rw-r--r--dbaccess/source/ui/app/AppControllerGen.cxx7
-rw-r--r--dbaccess/source/ui/browser/formadapter.cxx3
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx16
-rw-r--r--dbaccess/source/ui/control/dbtreelistbox.cxx9
-rw-r--r--dbaccess/source/ui/dlg/ConnectionHelper.cxx6
-rw-r--r--dbaccess/source/ui/dlg/paramdialog.cxx2
-rw-r--r--dbaccess/source/ui/dlg/queryfilter.cxx52
-rw-r--r--dbaccess/source/ui/dlg/tablespage.cxx5
-rw-r--r--dbaccess/source/ui/misc/TokenWriter.cxx3
-rw-r--r--dbaccess/source/ui/misc/WCopyTable.cxx9
-rw-r--r--dbaccess/source/ui/misc/databaseobjectview.cxx19
-rw-r--r--dbaccess/source/ui/misc/linkeddocuments.cxx34
-rw-r--r--dbaccess/source/ui/misc/singledoccontroller.cxx6
-rw-r--r--dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx6
-rw-r--r--dbaccess/source/ui/querydesign/TableFieldDescription.cxx5
-rw-r--r--dbaccess/source/ui/querydesign/TableWindowAccess.cxx3
-rw-r--r--dbaccess/source/ui/querydesign/limitboxcontroller.cxx6
-rw-r--r--dbaccess/source/ui/querydesign/querycontroller.cxx8
-rw-r--r--dbaccess/source/ui/uno/textconnectionsettings_uno.cxx13
20 files changed, 95 insertions, 130 deletions
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index a8fd1cec3c94..7a329bc513f0 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -2729,7 +2729,7 @@ sal_Bool SAL_CALL OApplicationController::select( const Any& _aSelection )
if ( !( _aSelection >>= aSelectedObjects ) )
{
aSelectedObjects.realloc( 1 );
- if ( !( _aSelection >>= aSelectedObjects[0] ) )
+ if ( !( _aSelection >>= aSelectedObjects.getArray()[0] ) )
throw IllegalArgumentException();
}
@@ -2816,13 +2816,14 @@ Any SAL_CALL OApplicationController::getSelection( )
{ // if no objects are selected, add an entry to the sequence which describes the overall category
// which is selected currently
aCurrentSelection.realloc(1);
- aCurrentSelection[0].Name = getDatabaseName();
+ auto pCurrentSelection = aCurrentSelection.getArray();
+ pCurrentSelection[0].Name = getDatabaseName();
switch ( eType )
{
- case E_TABLE: aCurrentSelection[0].Type = DatabaseObjectContainer::TABLES; break;
- case E_QUERY: aCurrentSelection[0].Type = DatabaseObjectContainer::QUERIES; break;
- case E_FORM: aCurrentSelection[0].Type = DatabaseObjectContainer::FORMS; break;
- case E_REPORT: aCurrentSelection[0].Type = DatabaseObjectContainer::REPORTS; break;
+ case E_TABLE: pCurrentSelection[0].Type = DatabaseObjectContainer::TABLES; break;
+ case E_QUERY: pCurrentSelection[0].Type = DatabaseObjectContainer::QUERIES; break;
+ case E_FORM: pCurrentSelection[0].Type = DatabaseObjectContainer::FORMS; break;
+ case E_REPORT: pCurrentSelection[0].Type = DatabaseObjectContainer::REPORTS; break;
default:
OSL_FAIL( "OApplicationController::getSelection: unexpected current element type!" );
break;
diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx
index 632523e76977..3ec1094eeb9e 100644
--- a/dbaccess/source/ui/app/AppControllerGen.cxx
+++ b/dbaccess/source/ui/app/AppControllerGen.cxx
@@ -155,6 +155,7 @@ void OApplicationController::openDialog( const OUString& _sServiceName )
weld::WaitObject aWO(getFrameWeld());
Sequence< Any > aArgs(3);
+ auto pArgs = aArgs.getArray();
sal_Int32 nArgPos = 0;
Reference< css::awt::XWindow> xWindow = getTopMostContainerWindow();
@@ -165,7 +166,7 @@ void OApplicationController::openDialog( const OUString& _sServiceName )
xWindow = VCLUnoHelper::GetInterface(getView()->Window::GetParent());
}
// the parent window
- aArgs[nArgPos++] <<= PropertyValue( "ParentWindow",
+ pArgs[nArgPos++] <<= PropertyValue( "ParentWindow",
0,
makeAny(xWindow),
PropertyState_DIRECT_VALUE);
@@ -176,7 +177,7 @@ void OApplicationController::openDialog( const OUString& _sServiceName )
sInitialSelection = getDatabaseName();
if ( !sInitialSelection.isEmpty() )
{
- aArgs[ nArgPos++ ] <<= PropertyValue(
+ pArgs[ nArgPos++ ] <<= PropertyValue(
"InitialSelection", 0,
makeAny( sInitialSelection ), PropertyState_DIRECT_VALUE );
}
@@ -184,7 +185,7 @@ void OApplicationController::openDialog( const OUString& _sServiceName )
SharedConnection xConnection( getConnection() );
if ( xConnection.is() )
{
- aArgs[ nArgPos++ ] <<= PropertyValue(
+ pArgs[ nArgPos++ ] <<= PropertyValue(
PROPERTY_ACTIVE_CONNECTION, 0,
makeAny( xConnection ), PropertyState_DIRECT_VALUE );
}
diff --git a/dbaccess/source/ui/browser/formadapter.cxx b/dbaccess/source/ui/browser/formadapter.cxx
index 37f35a0472ee..4b98babb26c9 100644
--- a/dbaccess/source/ui/browser/formadapter.cxx
+++ b/dbaccess/source/ui/browser/formadapter.cxx
@@ -1227,13 +1227,14 @@ Sequence< Any > SAL_CALL SbaXFormAdapter::getPropertyValues(const Sequence< OUSt
return Sequence< Any>(aPropertyNames.getLength());
Sequence< Any> aReturn = xSet->getPropertyValues(aPropertyNames);
+ auto aReturnRange = asNonConstRange(aReturn);
// search for (and fake) the NAME property
OSL_ENSURE(aReturn.getLength() == aPropertyNames.getLength(), "SAL_CALL SbaXFormAdapter::getPropertyValues : the main form returned an invalid-length sequence !");
for (sal_Int32 i=0; i<aPropertyNames.getLength(); ++i)
if (aPropertyNames[i] == PROPERTY_NAME)
{
- aReturn[i] <<= m_sName;
+ aReturnRange[i] <<= m_sName;
break;
}
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index db4dc6da6290..16980f05bfe5 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -44,6 +44,7 @@
#include <svl/zforlist.hxx>
#include <cppuhelper/queryinterface.hxx>
#include <connectivity/dbtools.hxx>
+#include <comphelper/propertyvalue.hxx>
#include <comphelper/types.hxx>
#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
@@ -777,14 +778,10 @@ void SbaGridControl::SetBrowserAttrs()
try
{
Reference< XComponentContext > xContext = getContext();
- css::beans::PropertyValue aArg;
- css::uno::Sequence<css::uno::Any> aArguments(2);
- aArg.Name = "IntrospectedObject";
- aArg.Value <<= xGridModel;
- aArguments[0] <<= aArg;
- aArg.Name = "ParentWindow";
- aArg.Value <<= VCLUnoHelper::GetInterface(this);
- aArguments[1] <<= aArg;
+ css::uno::Sequence<css::uno::Any> aArguments{
+ Any(comphelper::makePropertyValue("IntrospectedObject", xGridModel)),
+ Any(comphelper::makePropertyValue("ParentWindow", VCLUnoHelper::GetInterface(this)))
+ };
Reference<XExecutableDialog> xExecute(xContext->getServiceManager()->createInstanceWithArgumentsAndContext("com.sun.star.form.ControlFontDialog",
aArguments, xContext), css::uno::UNO_QUERY_THROW);
xExecute->execute();
@@ -1063,8 +1060,7 @@ void SbaGridControl::implTransferSelectedRows( sal_Int16 nRowPos, bool _bTrueIfC
// collect the affected rows
if ((GetSelectRowCount() == 0) && (nRowPos >= 0))
{
- aSelectedRows.realloc( 1 );
- aSelectedRows[0] <<= static_cast<sal_Int32>(nRowPos + 1);
+ aSelectedRows = { Any(static_cast<sal_Int32>(nRowPos + 1)) };
bSelectionBookmarks = false;
}
else if ( !IsAllSelected() && GetSelectRowCount() )
diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx
index 55c9d3877389..2fd21fac1318 100644
--- a/dbaccess/source/ui/control/dbtreelistbox.cxx
+++ b/dbaccess/source/ui/control/dbtreelistbox.cxx
@@ -366,10 +366,11 @@ IMPL_LINK(TreeListBox, CommandHdl, const CommandEvent&, rCEvt, bool)
if (aResourceName.isEmpty())
return false;
- css::uno::Sequence< css::uno::Any > aArgs( 3 );
- aArgs[0] <<= comphelper::makePropertyValue( "Value", aResourceName );
- aArgs[1] <<= comphelper::makePropertyValue( "Frame", m_pContextMenuProvider->getCommandController().getXController()->getFrame() );
- aArgs[2] <<= comphelper::makePropertyValue( "IsContextMenu", true );
+ css::uno::Sequence< css::uno::Any > aArgs{
+ css::uno::Any(comphelper::makePropertyValue( "Value", aResourceName )),
+ css::uno::Any(comphelper::makePropertyValue( "Frame", m_pContextMenuProvider->getCommandController().getXController()->getFrame() )),
+ css::uno::Any(comphelper::makePropertyValue( "IsContextMenu", true ))
+ };
css::uno::Reference< css::uno::XComponentContext > xContext = comphelper::getProcessComponentContext();
css::uno::Reference<css::frame::XPopupMenuController> xMenuController
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index 184f49046a90..b9c954c62c0b 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -614,16 +614,14 @@ namespace dbaui
// the properties which need to be set on the new content
Sequence< OUString > aNewDirectoryProperties { "Title" };
- // the values to be set
- Sequence< Any > aNewDirectoryAttributes(1);
-
// loop
for ( std::vector< OUString >::const_reverse_iterator aLocalName = aToBeCreated.rbegin();
aLocalName != aToBeCreated.rend();
++aLocalName
)
{
- aNewDirectoryAttributes[0] <<= *aLocalName;
+ // the values to be set
+ Sequence< Any > aNewDirectoryAttributes{ Any(* aLocalName) };
if (!aParent.insertNewContent(sContentType, aNewDirectoryProperties, aNewDirectoryAttributes, aParent))
return false;
}
diff --git a/dbaccess/source/ui/dlg/paramdialog.cxx b/dbaccess/source/ui/dlg/paramdialog.cxx
index 5bb6024a4b67..12f96d186f78 100644
--- a/dbaccess/source/ui/dlg/paramdialog.cxx
+++ b/dbaccess/source/ui/dlg/paramdialog.cxx
@@ -280,7 +280,7 @@ namespace dbaui
return true;
}
- m_aFinalValues[m_nCurrentlySelected].Value <<= m_xParam->get_text();
+ m_aFinalValues.getArray()[m_nCurrentlySelected].Value <<= m_xParam->get_text();
}
// initialize the controls with the new values
diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx
index 1b75869cf15e..c5490bd959c1 100644
--- a/dbaccess/source/ui/dlg/queryfilter.cxx
+++ b/dbaccess/source/ui/dlg/queryfilter.cxx
@@ -675,22 +675,18 @@ IMPL_LINK_NOARG(DlgFilterCrit, ListSelectCompHdl, weld::ComboBox&, void)
void DlgFilterCrit::BuildWherePart()
{
- Sequence<Sequence<PropertyValue> > aFilter,aHaving;
- aFilter.realloc(1);
- aHaving.realloc(1);
+ Sequence<Sequence<PropertyValue> > aFilter(1),aHaving(1);
if( LbPos(*m_xLB_WHEREFIELD1) != 0 )
{
PropertyValue aValue;
if ( getCondition(*m_xLB_WHEREFIELD1,*m_xLB_WHERECOMP1,*m_xET_WHEREVALUE1,aValue) )
{
- aHaving[0].realloc(1);
- aHaving[0][0] = aValue;
+ aHaving = { { aValue } };
}
else
{
- aFilter[0].realloc(1);
- aFilter[0][0] = aValue;
+ aFilter = { { aValue} };
}
}
@@ -700,22 +696,13 @@ void DlgFilterCrit::BuildWherePart()
Sequence<Sequence<PropertyValue> >& _rValues = aFilter;
if ( getCondition(*m_xLB_WHEREFIELD2,*m_xLB_WHERECOMP2,*m_xET_WHEREVALUE2,aValue) )
_rValues = aHaving;
- PropertyValue* pPos = nullptr;
if ( m_xLB_WHERECOND2->get_active() )
- {
- sal_Int32 nPos = _rValues.getLength();
- _rValues.realloc( nPos + 1);
- _rValues[nPos].realloc( 1);
- pPos = &_rValues[nPos][0];
- }
- else
- {
- sal_Int32 nPos = _rValues.getLength() - 1;
- sal_Int32 nAndPos = _rValues[nPos].getLength();
- _rValues[nPos].realloc( _rValues[nPos].getLength() + 1);
- pPos = &_rValues[nPos][nAndPos];
- }
- *pPos = aValue;
+ _rValues.realloc( _rValues.getLength() + 1);
+ sal_Int32 nPos = _rValues.getLength() - 1;
+ sal_Int32 nAndPos = _rValues[nPos].getLength();
+ auto pValues = _rValues.getArray();
+ pValues[nPos].realloc( _rValues[nPos].getLength() + 1);
+ pValues[nPos].getArray()[nAndPos] = aValue;
}
if( LbPos(*m_xLB_WHEREFIELD3) != 0 )
@@ -724,22 +711,13 @@ void DlgFilterCrit::BuildWherePart()
Sequence<Sequence<PropertyValue> >& _rValues = aFilter;
if ( getCondition(*m_xLB_WHEREFIELD3,*m_xLB_WHERECOMP3,*m_xET_WHEREVALUE3,aValue) )
_rValues = aHaving;
- PropertyValue* pPos = nullptr;
if (m_xLB_WHERECOND3->get_active())
- {
- sal_Int32 nPos = _rValues.getLength();
- _rValues.realloc( nPos + 1);
- _rValues[nPos].realloc( 1);
- pPos = &_rValues[nPos][0];
- }
- else
- {
- sal_Int32 nPos = _rValues.getLength() - 1;
- sal_Int32 nAndPos = _rValues[nPos].getLength();
- _rValues[nPos].realloc( _rValues[nPos].getLength() + 1);
- pPos = &_rValues[nPos][nAndPos];
- }
- *pPos = aValue;
+ _rValues.realloc( _rValues.getLength() + 1);
+ sal_Int32 nPos = _rValues.getLength() - 1;
+ sal_Int32 nAndPos = _rValues[nPos].getLength();
+ auto pValues = _rValues.getArray();
+ pValues[nPos].realloc( _rValues[nPos].getLength() + 1);
+ pValues[nPos].getArray()[nAndPos] = aValue;
}
try
{
diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx
index 91456123ec58..d8ff8f863923 100644
--- a/dbaccess/source/ui/dlg/tablespage.cxx
+++ b/dbaccess/source/ui/dlg/tablespage.cxx
@@ -412,7 +412,7 @@ namespace dbaui
sal_Int32 nOldLen = aTableFilter.getLength();
aTableFilter.realloc(nOldLen + 1);
// add the new name
- aTableFilter[nOldLen] = sComposedName.makeStringAndClear();
+ aTableFilter.getArray()[nOldLen] = sComposedName.makeStringAndClear();
}
if (bCatalogWildcard)
@@ -463,8 +463,7 @@ namespace dbaui
auto xRoot = m_xTablesList->getAllObjectsEntry();
if (xRoot && m_xTablesList->isWildcardChecked(*xRoot))
{
- aTableFilter.realloc(1);
- aTableFilter[0] = "%";
+ aTableFilter = { "%" };
}
else
{
diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx
index c0401f591a6f..615620ba6271 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -695,8 +695,9 @@ void OHTMLImportExport::WriteTables()
{
sal_Int32 nCount = m_xResultSetMetaData->getColumnCount();
aNames.realloc(nCount);
+ auto aNamesRange = asNonConstRange(aNames);
for (sal_Int32 i= 0; i < nCount; ++i)
- aNames[i] = m_xResultSetMetaData->getColumnName(i+1);
+ aNamesRange[i] = m_xResultSetMetaData->getColumnName(i+1);
bUseResultMetaData = true;
}
}
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index b72e16180727..376c882d373f 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -55,6 +55,8 @@
#include <sal/log.hxx>
#include <tools/diagnose_ex.h>
+#include <algorithm>
+
using namespace ::dbaui;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
@@ -327,9 +329,8 @@ void NamedTableCopySource::impl_ensureColumnInfo_throw()
Sequence< OUString > NamedTableCopySource::getColumnNames() const
{
Sequence< OUString > aNames( m_aColumnInfo.size() );
- size_t nPos = 0;
- for (auto const& elem : m_aColumnInfo)
- aNames[ nPos++ ] = elem.GetName();
+ std::transform(m_aColumnInfo.begin(), m_aColumnInfo.end(), aNames.getArray(),
+ [](const auto& elem) { return elem.GetName(); });
return aNames;
}
@@ -346,7 +347,7 @@ Sequence< OUString > NamedTableCopySource::getPrimaryKeyColumnNames() const
{
sal_Int32 len( aPKColNames.getLength() );
aPKColNames.realloc( len + 1 );
- aPKColNames[ len ] = xPKDescRow->getString( 4 ); // COLUMN_NAME
+ aPKColNames.getArray()[ len ] = xPKDescRow->getString( 4 ); // COLUMN_NAME
}
}
catch( const Exception& )
diff --git a/dbaccess/source/ui/misc/databaseobjectview.cxx b/dbaccess/source/ui/misc/databaseobjectview.cxx
index 7c47a8101bb6..4a58f085acb0 100644
--- a/dbaccess/source/ui/misc/databaseobjectview.cxx
+++ b/dbaccess/source/ui/misc/databaseobjectview.cxx
@@ -103,21 +103,10 @@ namespace dbaui
if ( !m_xFrameLoader.is() )
{
Reference< XSingleServiceFactory > xFact = TaskCreator::create(m_xORB);
- Sequence< Any > lArgs(3);
- NamedValue aProp;
- sal_Int32 nArg = 0;
-
- aProp.Name = "ParentFrame";
- aProp.Value <<= m_xParentFrame;
- lArgs[nArg++] <<= aProp;
-
- aProp.Name = "TopWindow";
- aProp.Value <<= true;
- lArgs[nArg++] <<= aProp;
-
- aProp.Name = "SupportPersistentWindowState";
- aProp.Value <<= true;
- lArgs[nArg++] <<= aProp;
+ Sequence< Any > lArgs{ Any(NamedValue("ParentFrame", Any(m_xParentFrame))),
+ Any(NamedValue("TopWindow", Any(true))),
+ Any(NamedValue("SupportPersistentWindowState",
+ Any(true))) };
m_xFrameLoader.set(xFact->createInstanceWithArguments(lArgs), UNO_QUERY_THROW);
diff --git a/dbaccess/source/ui/misc/linkeddocuments.cxx b/dbaccess/source/ui/misc/linkeddocuments.cxx
index 13effe4ccd93..15394133ed59 100644
--- a/dbaccess/source/ui/misc/linkeddocuments.cxx
+++ b/dbaccess/source/ui/misc/linkeddocuments.cxx
@@ -65,24 +65,22 @@ namespace dbaui
sal_uInt8 b8, sal_uInt8 b9, sal_uInt8 b10, sal_uInt8 b11,
sal_uInt8 b12, sal_uInt8 b13, sal_uInt8 b14, sal_uInt8 b15 )
{
- Sequence< sal_Int8 > aResult( 16 );
- aResult[0] = static_cast<sal_Int8>(n1 >> 24);
- aResult[1] = static_cast<sal_Int8>(( n1 << 8 ) >> 24);
- aResult[2] = static_cast<sal_Int8>(( n1 << 16 ) >> 24);
- aResult[3] = static_cast<sal_Int8>(( n1 << 24 ) >> 24);
- aResult[4] = static_cast<sal_Int8>(n2 >> 8);
- aResult[5] = static_cast<sal_Int8>(( n2 << 8 ) >> 8);
- aResult[6] = static_cast<sal_Int8>(n3 >> 8);
- aResult[7] = static_cast<sal_Int8>(( n3 << 8 ) >> 8);
- aResult[8] = b8;
- aResult[9] = b9;
- aResult[10] = b10;
- aResult[11] = b11;
- aResult[12] = b12;
- aResult[13] = b13;
- aResult[14] = b14;
- aResult[15] = b15;
-
+ Sequence< sal_Int8 > aResult{ /* [ 0] */ static_cast<sal_Int8>(n1 >> 24),
+ /* [ 1] */ static_cast<sal_Int8>(( n1 << 8 ) >> 24),
+ /* [ 2] */ static_cast<sal_Int8>(( n1 << 16 ) >> 24),
+ /* [ 3] */ static_cast<sal_Int8>(( n1 << 24 ) >> 24),
+ /* [ 4] */ static_cast<sal_Int8>(n2 >> 8),
+ /* [ 5] */ static_cast<sal_Int8>(( n2 << 8 ) >> 8),
+ /* [ 6] */ static_cast<sal_Int8>(n3 >> 8),
+ /* [ 7] */ static_cast<sal_Int8>(( n3 << 8 ) >> 8),
+ /* [ 8] */ static_cast<sal_Int8>(b8),
+ /* [ 9] */ static_cast<sal_Int8>(b9),
+ /* [10] */ static_cast<sal_Int8>(b10),
+ /* [11] */ static_cast<sal_Int8>(b11),
+ /* [12] */ static_cast<sal_Int8>(b12),
+ /* [13] */ static_cast<sal_Int8>(b13),
+ /* [14] */ static_cast<sal_Int8>(b14),
+ /* [15] */ static_cast<sal_Int8>(b15) };
return aResult;
}
}
diff --git a/dbaccess/source/ui/misc/singledoccontroller.cxx b/dbaccess/source/ui/misc/singledoccontroller.cxx
index c07da46c955f..28b0c9e774bd 100644
--- a/dbaccess/source/ui/misc/singledoccontroller.cxx
+++ b/dbaccess/source/ui/misc/singledoccontroller.cxx
@@ -123,8 +123,9 @@ namespace dbaui
{
size_t nCount(GetUndoManager().GetUndoActionCount());
Sequence<OUString> aSeq(nCount);
+ auto aSeqRange = asNonConstRange(aSeq);
for (size_t n = 0; n < nCount; ++n)
- aSeq[n] = GetUndoManager().GetUndoActionComment(n);
+ aSeqRange[n] = GetUndoManager().GetUndoActionComment(n);
aReturn.aValue <<= aSeq;
aReturn.bEnabled = true;
break;
@@ -134,8 +135,9 @@ namespace dbaui
{
size_t nCount(GetUndoManager().GetRedoActionCount());
Sequence<OUString> aSeq(nCount);
+ auto aSeqRange = asNonConstRange(aSeq);
for (size_t n = 0; n < nCount; ++n)
- aSeq[n] = GetUndoManager().GetRedoActionComment(n);
+ aSeqRange[n] = GetUndoManager().GetRedoActionComment(n);
aReturn.aValue <<= aSeq;
aReturn.bEnabled = true;
break;
diff --git a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
index 0918fb1979a1..f11ca853c930 100644
--- a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
+++ b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
@@ -144,11 +144,11 @@ namespace dbaui
if( nIndex < 0 || nIndex >= getRelationCount() )
throw IndexOutOfBoundsException();
- Sequence< Reference<XInterface> > aSeq(m_pLine ? 2 : 0);
+ Sequence< Reference<XInterface> > aSeq;
if( m_pLine )
{
- aSeq[0] = m_pLine->GetSourceWin()->GetAccessible();
- aSeq[1] = m_pLine->GetDestWin()->GetAccessible();
+ aSeq = { m_pLine->GetSourceWin()->GetAccessible(),
+ m_pLine->GetDestWin()->GetAccessible() };
}
return AccessibleRelation(AccessibleRelationType::CONTROLLED_BY,aSeq);
diff --git a/dbaccess/source/ui/querydesign/TableFieldDescription.cxx b/dbaccess/source/ui/querydesign/TableFieldDescription.cxx
index c8f0a402218f..1e8604181886 100644
--- a/dbaccess/source/ui/querydesign/TableFieldDescription.cxx
+++ b/dbaccess/source/ui/querydesign/TableFieldDescription.cxx
@@ -182,10 +182,11 @@ void OTableFieldDesc::Save( ::comphelper::NamedValueCollection& o_rSettings, con
sal_Int32 c = 0;
Sequence< PropertyValue > aCriteria( m_aCriteria.size() );
+ auto pCriteria = aCriteria.getArray();
for (auto const& criteria : m_aCriteria)
{
- aCriteria[c].Name = "Criterion_" + OUString::number( c );
- aCriteria[c].Value <<= criteria;
+ pCriteria[c].Name = "Criterion_" + OUString::number( c );
+ pCriteria[c].Value <<= criteria;
++c;
}
diff --git a/dbaccess/source/ui/querydesign/TableWindowAccess.cxx b/dbaccess/source/ui/querydesign/TableWindowAccess.cxx
index 3a35d4a66f9b..787d257b59e1 100644
--- a/dbaccess/source/ui/querydesign/TableWindowAccess.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowAccess.cxx
@@ -191,8 +191,7 @@ namespace dbaui
{
OJoinTableView* pView = m_pTable->getTableView();
auto aIter = pView->getTableConnections(m_pTable) + nIndex;
- aRet.TargetSet.realloc(1);
- aRet.TargetSet[0] = getParentChild(aIter - pView->getTableConnections().begin());
+ aRet.TargetSet = { getParentChild(aIter - pView->getTableConnections().begin()) };
aRet.RelationType = AccessibleRelationType::CONTROLLER_FOR;
}
return aRet;
diff --git a/dbaccess/source/ui/querydesign/limitboxcontroller.cxx b/dbaccess/source/ui/querydesign/limitboxcontroller.cxx
index f499135080b2..dad770975a44 100644
--- a/dbaccess/source/ui/querydesign/limitboxcontroller.cxx
+++ b/dbaccess/source/ui/querydesign/limitboxcontroller.cxx
@@ -15,6 +15,7 @@
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
+#include <comphelper/propertyvalue.hxx>
#include <vcl/InterimItemWindow.hxx>
#include <vcl/event.hxx>
#include <vcl/svapp.hxx>
@@ -106,8 +107,6 @@ private:
{
if (!m_xWidget->get_value_changed_from_saved())
return;
- uno::Sequence< beans::PropertyValue > aArgs( 1 );
- aArgs[0].Name = "DBLimit.Value";
sal_Int64 nLimit;
OUString sActiveText = m_xWidget->get_active_text();
if (sActiveText == DBA_RES(STR_QUERY_LIMIT_ALL))
@@ -119,8 +118,7 @@ private:
nLimit = -1;
}
set_value(nLimit);
- aArgs[0].Value <<= nLimit;
- m_pControl->dispatchCommand( aArgs );
+ m_pControl->dispatchCommand({ comphelper::makePropertyValue("DBLimit.Value", nLimit) });
}
///Initialize entries
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index 9500281a7275..450a1ba416a8 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -281,17 +281,17 @@ void SAL_CALL OQueryController::getFastPropertyValue( Any& o_rValue, sal_Int32 i
// one additional property:
const sal_Int32 nLength = aProps.getLength();
aProps.realloc( nLength + 1 );
- aProps[ nLength ] = Property(
+ auto pProps = aProps.getArray();
+ pProps[ nLength ] = Property(
"CurrentQueryDesign",
PROPERTY_ID_CURRENT_QUERY_DESIGN,
::cppu::UnoType< Sequence< PropertyValue > >::get(),
PropertyAttribute::READONLY
);
- auto [begin, end] = asNonConstRange(aProps);
std::sort(
- begin,
- end,
+ pProps,
+ pProps + aProps.getLength(),
::comphelper::PropertyCompareByName()
);
diff --git a/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx b/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx
index 3bbce14be9fa..78a470ddd5a0 100644
--- a/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx
+++ b/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx
@@ -149,43 +149,44 @@ namespace dbaui
// but whose values are stored in our item set
sal_Int32 nProp = aProps.getLength();
aProps.realloc( nProp + 6 );
+ auto pProps = aProps.getArray();
- aProps[ nProp++ ] = Property(
+ pProps[ nProp++ ] = Property(
"HeaderLine",
PROPERTY_ID_HEADER_LINE,
::cppu::UnoType< sal_Bool >::get(),
PropertyAttribute::TRANSIENT
);
- aProps[ nProp++ ] = Property(
+ pProps[ nProp++ ] = Property(
"FieldDelimiter",
PROPERTY_ID_FIELD_DELIMITER,
::cppu::UnoType< OUString >::get(),
PropertyAttribute::TRANSIENT
);
- aProps[ nProp++ ] = Property(
+ pProps[ nProp++ ] = Property(
"StringDelimiter",
PROPERTY_ID_STRING_DELIMITER,
::cppu::UnoType< OUString >::get(),
PropertyAttribute::TRANSIENT
);
- aProps[ nProp++ ] = Property(
+ pProps[ nProp++ ] = Property(
"DecimalDelimiter",
PROPERTY_ID_DECIMAL_DELIMITER,
::cppu::UnoType< OUString >::get(),
PropertyAttribute::TRANSIENT
);
- aProps[ nProp++ ] = Property(
+ pProps[ nProp++ ] = Property(
"ThousandDelimiter",
PROPERTY_ID_THOUSAND_DELIMITER,
::cppu::UnoType< OUString >::get(),
PropertyAttribute::TRANSIENT
);
- aProps[ nProp++ ] = Property(
+ pProps[ nProp++ ] = Property(
"CharSet",
PROPERTY_ID_ENCODING,
::cppu::UnoType< OUString >::get(),