summaryrefslogtreecommitdiff
path: root/xmlscript
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2012-09-06 10:21:11 +0100
committerNoel Power <noel.power@suse.com>2012-09-11 16:04:11 +0100
commit5dc19680cd27d4eaea5f2f7fdc48969f704e696a (patch)
treecfe6d7a44ce72c924509fc62cc7565f37ea15b77 /xmlscript
parent7f5ca4c9e1061a626039d1042e71c34fc3f61005 (diff)
add persistence support for the scrollable attributes
Change-Id: I6fc196233f997e540301cac2cdf1b99d48aa2bde
Diffstat (limited to 'xmlscript')
-rw-r--r--xmlscript/source/xmldlg_imexp/exp_share.hxx1
-rw-r--r--xmlscript/source/xmldlg_imexp/imp_share.hxx1
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx1
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_export.cxx16
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx1
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_import.cxx23
6 files changed, 43 insertions, 0 deletions
diff --git a/xmlscript/source/xmldlg_imexp/exp_share.hxx b/xmlscript/source/xmldlg_imexp/exp_share.hxx
index f2cbd45298f1..a03d42b69173 100644
--- a/xmlscript/source/xmldlg_imexp/exp_share.hxx
+++ b/xmlscript/source/xmldlg_imexp/exp_share.hxx
@@ -109,6 +109,7 @@ public:
template<typename T>
inline bool readProp( T * ret, OUString const & rPropName );
css::uno::Any readProp( OUString const & rPropName );
+ void readScrollableSettings();
void readDefaults( bool supportPrintable = true, bool supportVisible = true );
void readStringAttr(
OUString const & rPropName, OUString const & rAttrName );
diff --git a/xmlscript/source/xmldlg_imexp/imp_share.hxx b/xmlscript/source/xmldlg_imexp/imp_share.hxx
index 3f306b7f4e9c..5ea50d3af3a9 100644
--- a/xmlscript/source/xmldlg_imexp/imp_share.hxx
+++ b/xmlscript/source/xmldlg_imexp/imp_share.hxx
@@ -401,6 +401,7 @@ public:
inline css::uno::Reference< css::beans::XPropertySet > getControlModel() const
{ return _xControlModel; }
+ void importScollableSettings( css::uno::Reference< css::xml::input::XAttributes > const & xAttributes );
void importDefaults(
sal_Int32 nBaseX, sal_Int32 nBaseY,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
index a8c026ed94e0..c8daaaf1a704 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
@@ -1063,6 +1063,7 @@ void ElementDescriptor::readDialogModel( StyleBag * all_styles )
readBoolAttr( "Sizeable", XMLNS_DIALOGS_PREFIX ":resizeable" );
readStringAttr( "Title", XMLNS_DIALOGS_PREFIX ":title" );
+ readScrollableSettings();
Any aDecorationAny( _xProps->getPropertyValue( "Decoration" ) );
bool bDecoration = sal_False;
if ( (aDecorationAny >>= bDecoration) && !bDecoration )
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
index daaf6a27e0a0..b0004ed8bcd3 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
@@ -970,6 +970,22 @@ void ElementDescriptor::readSelectionTypeAttr( OUString const & rPropName, OUStr
}
}
//__________________________________________________________________________________________________
+void ElementDescriptor::readScrollableSettings()
+{
+ readLongAttr( "ScrollHeight",
+ XMLNS_DIALOGS_PREFIX ":scrollheight" );
+ readLongAttr( "ScrollWidth",
+ XMLNS_DIALOGS_PREFIX ":scrollwidth" );
+ readLongAttr( "ScrollTop",
+ XMLNS_DIALOGS_PREFIX ":scrolltop" );
+ readLongAttr( "ScrollLeft",
+ XMLNS_DIALOGS_PREFIX ":scrollleft" );
+ readBoolAttr( "HScroll",
+ XMLNS_DIALOGS_PREFIX ":hscroll" );
+ readBoolAttr( "VScroll",
+ XMLNS_DIALOGS_PREFIX ":vscroll" );
+}
+
void ElementDescriptor::readDefaults( bool supportPrintable, bool supportVisible )
{
Any a( _xProps->getPropertyValue( "Name" ) );
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
index 8bd9edbe7735..e8e3b5381fa7 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
@@ -1970,6 +1970,7 @@ void WindowElement::endElement()
ctx.importStringProperty("Title", "title", _xAttributes );
ctx.importBooleanProperty("Decoration", "withtitlebar", _xAttributes );
ctx.importImageURLProperty( "ImageURL" , "image-src" , _xAttributes );
+ ctx.importScollableSettings( _xAttributes );
ctx.importEvents( _events );
// avoid ring-reference:
// vector< event elements > holding event elements holding this (via _pParent)
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
index 6fec94bf13a1..d1dad5fcf498 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
@@ -1514,6 +1514,29 @@ void ImportContext::importEvents(
}
}
//__________________________________________________________________________________________________
+void ImportContext::importScollableSettings(
+ Reference< xml::input::XAttributes > const & _xAttributes )
+{
+ importLongProperty( OUString( "ScrollHeight" ),
+ OUString( "scrollheight" ),
+ _xAttributes );
+ importLongProperty( OUString( "ScrollWidth" ),
+ OUString( "scrollwidth" ),
+ _xAttributes );
+ importLongProperty( OUString( "ScrollTop" ),
+ OUString( "scrolltop" ),
+ _xAttributes );
+ importLongProperty( OUString( "ScrollLeft" ),
+ OUString( "scrollleft" ),
+ _xAttributes );
+ importBooleanProperty( OUString( "HScroll" ),
+ OUString( "hscroll" ),
+ _xAttributes );
+ importBooleanProperty( OUString( "VScroll" ),
+ OUString( "vscroll" ),
+ _xAttributes );
+}
+
void ImportContext::importDefaults(
sal_Int32 nBaseX, sal_Int32 nBaseY,
Reference< xml::input::XAttributes > const & xAttributes,