[Libreoffice-commits] core.git: xmloff/source
Julien Nabet (via logerrit)
logerrit at kemper.freedesktop.org
Sun Dec 13 15:49:24 UTC 2020
xmloff/source/forms/propertyexport.cxx | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
New commits:
commit e7fb2c18e96d04ec54274721df003ab01f2064ab
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Sun Dec 13 15:40:41 2020 +0100
Commit: Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Sun Dec 13 16:48:48 2020 +0100
Get rid of wrong warning in propertyexport (forms)
Create a brand new odt file, add an image with form Control then save
You'll notice this on console:
warn:legacy.osl:20299:20299:xmloff/source/forms/propertyexport.cxx:680: OPropertyExport::dbg_implCheckProperty: invalid property type!
it's wrong since most of the type the exported property should be a OUString (internal "string")
but it may also be a graphic::XGraphic and this case isn't dealt by DBG_CHECK_PROPERTY
since we only gave it "OUString()"
Change-Id: I268b8d5f79c84ea73acdac245ee1705ddd009ae9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107653
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx
index 86ef1db82ef0..74ea521322c6 100644
--- a/xmloff/source/forms/propertyexport.cxx
+++ b/xmloff/source/forms/propertyexport.cxx
@@ -386,8 +386,6 @@ namespace xmloff
void OPropertyExport::exportRelativeTargetLocation(const OUString& _sPropertyName,CCAFlags _nProperty,bool _bAddType)
{
- DBG_CHECK_PROPERTY( _sPropertyName, OUString );
-
Any aAny = m_xProps->getPropertyValue(_sPropertyName);
OUString sTargetLocation;
@@ -402,6 +400,11 @@ namespace xmloff
auto sURL = aAny.get<OUString>();
sTargetLocation = m_rContext.getGlobalContext().AddEmbeddedObject(sURL);
}
+ else
+ {
+ SAL_WARN("xmloff.forms", "OPropertyExport::exportRelativeTargetLocation: "
+ "Value of " << _sPropertyName << " not found!");
+ }
if (!sTargetLocation.isEmpty())
{
More information about the Libreoffice-commits
mailing list