summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2017-07-18 19:58:06 +0200
committerMichael Stahl <mstahl@redhat.com>2017-07-19 22:50:09 +0200
commit58ccac44f7df4273db31e4bbe9043bfb4af4d08a (patch)
treec60d65f9183e08e4748219c023131bcdeec9ab6b /xmloff
parentca004d940ee8cdec9a4e8bee869c23115d7fd378 (diff)
tdf#108824 Honor ODF default for "Mouse pointer visible" property
Change-Id: I6b4c431d66835b6affe834a23b900fa61830d87f Reviewed-on: https://gerrit.libreoffice.org/40159 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/core/xmlimp.cxx11
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx8
-rw-r--r--xmloff/source/draw/ximpshow.cxx8
3 files changed, 18 insertions, 9 deletions
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 16fcb5791baf..10f31883f236 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -175,11 +175,18 @@ public:
mnGeneratorVersion = SvXMLImport::LO_44x; // 4.4
}
}
- else
+ else if ('5' == loVersion[0])
{
- SAL_INFO_IF('5' != loVersion[0], "xmloff.core", "unknown LO version: " << loVersion);
mnGeneratorVersion = SvXMLImport::LO_5x;
}
+ else if ('6' == loVersion[0])
+ {
+ mnGeneratorVersion = SvXMLImport::LO_6x;
+ }
+ else
+ {
+ SAL_WARN("xmloff.core", "unknown LO version: " << loVersion);
+ }
return; // ignore buildIds
}
}
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 3172188a747b..19ac452fb2a7 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -1985,12 +1985,10 @@ void SdXMLExport::exportPresentationSettings()
bHasAttr = true;
}
+ // We need to always export this attribute, because the import had the wrong default (tdf#108824)
xPresProps->getPropertyValue("IsMouseVisible") >>= bTemp;
- if( bTemp )
- {
- AddAttribute(XML_NAMESPACE_PRESENTATION, XML_MOUSE_VISIBLE, XML_TRUE );
- bHasAttr = true;
- }
+ AddAttribute(XML_NAMESPACE_PRESENTATION, XML_MOUSE_VISIBLE, bTemp ? XML_TRUE : XML_FALSE);
+ bHasAttr = true;
xPresProps->getPropertyValue("StartWithNavigator") >>= bTemp;
if( bTemp )
diff --git a/xmloff/source/draw/ximpshow.cxx b/xmloff/source/draw/ximpshow.cxx
index c24228673bb1..caed5664e6ef 100644
--- a/xmloff/source/draw/ximpshow.cxx
+++ b/xmloff/source/draw/ximpshow.cxx
@@ -81,6 +81,10 @@ SdXMLShowsContext::SdXMLShowsContext( SdXMLImport& rImport, sal_uInt16 nPrfx, c
{
bool bAll = true;
uno::Any aAny;
+ // Per ODF this is default, but we did it wrong before LO 6.0 (tdf#108824)
+ bool bIsMouseVisible = true;
+ if (rImport.getGeneratorVersion() < SvXMLImport::LO_6x)
+ bIsMouseVisible = false;
// read attributes
const sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
@@ -141,8 +145,7 @@ SdXMLShowsContext::SdXMLShowsContext( SdXMLImport& rImport, sal_uInt16 nPrfx, c
}
else if( IsXMLToken( aLocalName, XML_MOUSE_VISIBLE ) )
{
- aAny <<= IsXMLToken( sValue, XML_TRUE );
- mpImpl->mxPresProps->setPropertyValue("IsMouseVisible", aAny );
+ bIsMouseVisible = IsXMLToken( sValue, XML_TRUE );
}
else if( IsXMLToken( aLocalName, XML_START_WITH_NAVIGATOR ) )
{
@@ -167,6 +170,7 @@ SdXMLShowsContext::SdXMLShowsContext( SdXMLImport& rImport, sal_uInt16 nPrfx, c
}
}
mpImpl->mxPresProps->setPropertyValue("IsShowAll", Any(bAll) );
+ mpImpl->mxPresProps->setPropertyValue("IsMouseVisible", Any(bIsMouseVisible) );
}
}