summaryrefslogtreecommitdiff
path: root/xmlscript
diff options
context:
space:
mode:
Diffstat (limited to 'xmlscript')
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_export.cxx19
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_import.cxx18
2 files changed, 37 insertions, 0 deletions
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
index 6e5f91f7f741..9535d8a46c1a 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
@@ -33,6 +33,7 @@
#include "exp_share.hxx"
#include <rtl/ustrbuf.hxx>
+#include <tools/diagnose_ex.h>
#include <com/sun/star/awt/CharSet.hpp>
#include <com/sun/star/awt/FontFamily.hpp>
@@ -996,6 +997,24 @@ void ElementDescriptor::readDefaults( bool supportPrintable )
OSL_ENSURE( 0, "unexpected property type for \"Enabled\": not bool!" );
}
+ sal_Bool bVisible = sal_True;
+ try
+ {
+ if (_xProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("EnableVisible") ) ) >>= bVisible)
+ {
+
+ // only write out the non default case
+ if (! bVisible)
+ {
+ addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":visible") ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM("false") ) );
+ }
+ }
+ }
+ catch( Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
// force writing of pos/size
a = _xProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("PositionX") ) );
if (a.getValueTypeClass() == TypeClass_LONG)
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
index f02b9d46b2aa..78b2fed46673 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
@@ -33,6 +33,7 @@
#include "imp_share.hxx"
#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
#include <osl/mutex.hxx>
#include <rtl/ustrbuf.hxx>
@@ -1612,6 +1613,23 @@ void ImportContext::importDefaults(
OUString( RTL_CONSTASCII_USTRINGPARAM("Enabled") ), makeAny( sal_False ) );
}
+ sal_Bool bVisible = sal_True;
+ if (getBoolAttr(
+ &bVisible, OUString( RTL_CONSTASCII_USTRINGPARAM("visible") ),
+ xAttributes, _pImport->XMLNS_DIALOGS_UID ) && !bVisible)
+ {
+ try
+ {
+
+ _xControlModel->setPropertyValue(
+ OUString( RTL_CONSTASCII_USTRINGPARAM("EnableVisible") ), makeAny( sal_False ) );
+ }
+ catch( Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+
if (!importLongProperty( nBaseX,
OUString( RTL_CONSTASCII_USTRINGPARAM("PositionX") ),
OUString( RTL_CONSTASCII_USTRINGPARAM("left") ),