dbaccess/source/core/dataaccess/ModelImpl.cxx |   40 ++++++++++++--------------
 toolkit/source/controls/unocontrolmodel.cxx   |    3 +
 2 files changed, 21 insertions(+), 22 deletions(-)

New commits:
commit 67ddb2f7591a49eb06516c8cc408e2c242540a6c
Author:     Samuel Mehrbrodt <[email protected]>
AuthorDate: Mon Feb 23 15:34:18 2026 +0100
Commit:     Samuel Mehrbrodt <[email protected]>
CommitDate: Mon Mar 9 13:02:46 2026 +0100

    Add missing BASEPROPERTY_REFERER default
    
    Fixes warnings like:
      
warn:legacy.osl:1638172:1638172:toolkit/source/controls/unocontrolmodel.cxx:376:
 ImplGetDefaultValue - unknown Property
    
    Change-Id: I4118c01770fc3404c064b58deeba94655d83e670
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200061
    Reviewed-by: Samuel Mehrbrodt <[email protected]>
    Tested-by: Jenkins
    (cherry picked from commit ea43b6506ea51141652a68e51023f1e32d1d4c73)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201259
    Tested-by: Jenkins CollaboraOffice <[email protected]>

diff --git a/toolkit/source/controls/unocontrolmodel.cxx 
b/toolkit/source/controls/unocontrolmodel.cxx
index 3b18a4287ee1..9b487a0b76bb 100644
--- a/toolkit/source/controls/unocontrolmodel.cxx
+++ b/toolkit/source/controls/unocontrolmodel.cxx
@@ -209,7 +209,8 @@ css::uno::Any UnoControlModel::ImplGetDefaultValue( 
sal_uInt16 nPropId ) const
             case BASEPROPERTY_BACKGROUNDCOLOR:
             case BASEPROPERTY_FILLCOLOR:
             case BASEPROPERTY_HIGHLIGHT_COLOR:
-            case BASEPROPERTY_HIGHLIGHT_TEXT_COLOR:            break;  // Void
+            case BASEPROPERTY_HIGHLIGHT_TEXT_COLOR:
+            case BASEPROPERTY_REFERER:                        break;  // Void
 
             case BASEPROPERTY_FONTRELIEF:
             case BASEPROPERTY_FONTEMPHASISMARK:
commit ba9063e35450f600b9761cd057ccbe804fc0afcb
Author:     Samuel Mehrbrodt <[email protected]>
AuthorDate: Mon Feb 23 14:33:02 2026 +0100
Commit:     Samuel Mehrbrodt <[email protected]>
CommitDate: Mon Mar 9 13:02:32 2026 +0100

    Remove unnecessary OSL_ENSURE
    
    All callers handle empty storage references, and this is expected
    when database components are initialized without a backing file.
    
    Fixes warnings like:
      
warn:legacy.osl:1530244:1530244:dbaccess/source/core/dataaccess/ModelImpl.cxx:768:
 ODatabaseModelImpl::getOrCreateRootStorage: no source to create the storage 
from!
    
    Change-Id: Ie53b3be6908a2a9b910dd374703237a4aea09794
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200058
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <[email protected]>
    (cherry picked from commit 2a6b0e91fa0990d3098c7b7a705d69da64b8110b)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201262
    Tested-by: Jenkins CollaboraOffice <[email protected]>

diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx 
b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index be5c10737131..d7953166f6c5 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -765,39 +765,37 @@ Reference< XStorage > const & 
ODatabaseModelImpl::getOrCreateRootStorage()
             aSource <<= m_sDocFileLocation;
         // TODO: shouldn't we also check URL?
 
-        OSL_ENSURE( aSource.hasValue(), 
"ODatabaseModelImpl::getOrCreateRootStorage: no source to create the storage 
from!" );
+        if ( !aSource.hasValue() )
+            return m_xDocumentStorage.getTyped();
 
-        if ( aSource.hasValue() )
-        {
-            Sequence< Any > aStorageCreationArgs{ aSource, 
Any(ElementModes::READWRITE) };
+        Sequence< Any > aStorageCreationArgs{ aSource, 
Any(ElementModes::READWRITE) };
 
-            Reference< XStorage > xDocumentStorage;
-            OUString sURL;
-            aSource >>= sURL;
-            // Don't try to load a meta-URL as-is.
-            if (!sURL.startsWithIgnoreAsciiCase("vnd.sun.star.pkg:"))
+        Reference< XStorage > xDocumentStorage;
+        OUString sURL;
+        aSource >>= sURL;
+        // Don't try to load a meta-URL as-is.
+        if (!sURL.startsWithIgnoreAsciiCase("vnd.sun.star.pkg:"))
+        {
+            try
+            {
+                xDocumentStorage.set( 
xStorageFactory->createInstanceWithArguments( aStorageCreationArgs ), 
UNO_QUERY_THROW );
+            }
+            catch( const Exception& )
             {
+                m_bDocumentReadOnly = true;
+                aStorageCreationArgs.getArray()[1] <<= ElementModes::READ;
                 try
                 {
                     xDocumentStorage.set( 
xStorageFactory->createInstanceWithArguments( aStorageCreationArgs ), 
UNO_QUERY_THROW );
                 }
                 catch( const Exception& )
                 {
-                    m_bDocumentReadOnly = true;
-                    aStorageCreationArgs.getArray()[1] <<= ElementModes::READ;
-                    try
-                    {
-                        xDocumentStorage.set( 
xStorageFactory->createInstanceWithArguments( aStorageCreationArgs ), 
UNO_QUERY_THROW );
-                    }
-                    catch( const Exception& )
-                    {
-                        DBG_UNHANDLED_EXCEPTION("dbaccess");
-                    }
+                    DBG_UNHANDLED_EXCEPTION("dbaccess");
                 }
             }
-
-            impl_switchToStorage_throw( xDocumentStorage );
         }
+
+        impl_switchToStorage_throw( xDocumentStorage );
     }
     return m_xDocumentStorage.getTyped();
 }

Reply via email to