diff options
Diffstat (limited to 'package')
-rw-r--r-- | package/source/xstor/xstorage.cxx | 6 | ||||
-rw-r--r-- | package/source/xstor/xstorage.hxx | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx index 05150a48f988..d19d1cac7f33 100644 --- a/package/source/xstor/xstorage.cxx +++ b/package/source/xstor/xstorage.cxx @@ -403,6 +403,8 @@ void OStorage_Impl::OpenOwnPackage() aArguments.realloc( ++nArgNum ); pArguments = aArguments.getArray(); pArguments[nArgNum-1] <<= aNamedValue; + if (rProp.Name == "RepairPackage") + rProp.Value >>= m_bRepairPackage; } else if ( rProp.Name == "Password" ) { @@ -1264,6 +1266,10 @@ SotElement_Impl* OStorage_Impl::FindElement( const OUString& rName ) ReadContents(); auto mapIt = m_aChildrenMap.find(rName); + if (mapIt == m_aChildrenMap.end() && m_bRepairPackage) + mapIt = std::find_if(m_aChildrenMap.begin(), m_aChildrenMap.end(), + [&rName](const auto& pair) + { return rName.equalsIgnoreAsciiCase(pair.first); }); if (mapIt == m_aChildrenMap.end()) return nullptr; for (auto pElement : mapIt->second) diff --git a/package/source/xstor/xstorage.hxx b/package/source/xstor/xstorage.hxx index a32aeca1d25d..54fe49a9d9ca 100644 --- a/package/source/xstor/xstorage.hxx +++ b/package/source/xstor/xstorage.hxx @@ -122,6 +122,7 @@ struct OStorage_Impl bool m_bIsRoot; // marks this storage as root storages that manages all commits and reverts bool m_bListCreated; + bool m_bRepairPackage = false; /// Count of registered modification listeners oslInterlockedCount m_nModifiedListenerCount; |