summaryrefslogtreecommitdiffstats
path: root/dbaccess/source
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 11:48:25 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 11:48:25 +0000
commit9c0049cfae49c8e4ddef9125a69db2ad134c10c6 (patch)
tree812a86c0eee63dfc5ace12f2622ed3ce9cd3d680 /dbaccess/source
parentReleasing progress-linux version 4:24.2.3-2~progress7.99u1. (diff)
downloadlibreoffice-9c0049cfae49c8e4ddef9125a69db2ad134c10c6.tar.xz
libreoffice-9c0049cfae49c8e4ddef9125a69db2ad134c10c6.zip
Merging upstream version 4:24.2.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dbaccess/source')
-rw-r--r--dbaccess/source/ui/relationdesign/RTableConnection.cxx2
-rw-r--r--dbaccess/source/ui/relationdesign/RTableConnectionData.cxx5
-rw-r--r--dbaccess/source/ui/relationdesign/RelationTableView.cxx10
3 files changed, 10 insertions, 7 deletions
diff --git a/dbaccess/source/ui/relationdesign/RTableConnection.cxx b/dbaccess/source/ui/relationdesign/RTableConnection.cxx
index ba60ae5466..4b8086f511 100644
--- a/dbaccess/source/ui/relationdesign/RTableConnection.cxx
+++ b/dbaccess/source/ui/relationdesign/RTableConnection.cxx
@@ -51,7 +51,7 @@ void ORelationTableConnection::Draw(vcl::RenderContext& rRenderContext, const to
{
OTableConnection::Draw(rRenderContext, rRect);
ORelationTableConnectionData* pData = static_cast< ORelationTableConnectionData* >(GetData().get());
- if (pData && (pData->GetCardinality() == Cardinality::Undefined))
+ if (!pData || pData->GetCardinality() == Cardinality::Undefined)
return;
// search lines for top line
diff --git a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
index 2fb7c0b821..9651a89c9f 100644
--- a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
+++ b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
@@ -256,7 +256,8 @@ bool ORelationTableConnectionData::Update()
xKey->setPropertyValue(PROPERTY_NAME,Any(sKeyName));
xKey->setPropertyValue(PROPERTY_TYPE,Any(KeyType::FOREIGN));
- xKey->setPropertyValue(PROPERTY_REFERENCEDTABLE,Any(getReferencedTable()->GetTableName()));
+ // get the full name of the tables to ensure uniqueness across catalogs and schema
+ xKey->setPropertyValue(PROPERTY_REFERENCEDTABLE,Any(getReferencedTable()->GetComposedName()));
xKey->setPropertyValue(PROPERTY_UPDATERULE, Any(GetUpdateRules()));
xKey->setPropertyValue(PROPERTY_DELETERULE, Any(GetDeleteRules()));
}
@@ -301,7 +302,7 @@ bool ORelationTableConnectionData::Update()
{
OUString sReferencedTable;
xKey->getPropertyValue(PROPERTY_REFERENCEDTABLE) >>= sReferencedTable;
- if ( sReferencedTable == getReferencedTable()->GetTableName() )
+ if ( sReferencedTable == getReferencedTable()->GetComposedName() )
{
xColSup.set(xKey,UNO_QUERY_THROW);
try
diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
index 6c96d39520..da82719b7a 100644
--- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
@@ -108,7 +108,8 @@ void ORelationTableView::ReSync()
// it should be cleaned up, including its data in the document
pTabWin->clearListBox();
pTabWin.disposeAndClear();
- arrInvalidTables.push_back(pData->GetTableName());
+ // get the full name of the tables to ensure uniqueness across catalogs and schema
+ arrInvalidTables.push_back(pData->GetComposedName());
std::erase(rTabWinDataList, *aIter);
continue;
@@ -132,9 +133,9 @@ void ORelationTableView::ReSync()
if ( !arrInvalidTables.empty() )
{
// do the tables to the connection exist?
- OUString strTabExistenceTest = pTabConnData->getReferencingTable()->GetTableName();
+ OUString strTabExistenceTest = pTabConnData->getReferencingTable()->GetComposedName();
bool bInvalid = std::find(arrInvalidTables.begin(),arrInvalidTables.end(),strTabExistenceTest) != arrInvalidTables.end();
- strTabExistenceTest = pTabConnData->getReferencedTable()->GetTableName();
+ strTabExistenceTest = pTabConnData->getReferencedTable()->GetComposedName();
bInvalid = bInvalid || std::find(arrInvalidTables.begin(),arrInvalidTables.end(),strTabExistenceTest) != arrInvalidTables.end();
if (bInvalid)
@@ -290,7 +291,8 @@ void ORelationTableView::AddTabWin(const OUString& _rComposedName, const OUStrin
}
// enter the new data structure into DocShell
- TTableWindowData::value_type pNewTabWinData(createTableWindowData( _rComposedName, rWinName,rWinName ));
+ // show the table's full name as window name to ensure uniqueness across catalogs and schema
+ TTableWindowData::value_type pNewTabWinData(createTableWindowData( _rComposedName, rWinName, _rComposedName ));
pNewTabWinData->ShowAll(false);
// link new window into the window list