[Libreoffice-commits] core.git: comphelper/source dbaccess/source framework/source include/comphelper reportdesign/source sc/source
Stephan Bergmann
sbergman at redhat.com
Fri Jun 17 17:41:35 UTC 2016
comphelper/source/property/propertybag.cxx | 4
comphelper/source/property/propertycontainerhelper.cxx | 14 -
dbaccess/source/core/api/RowSetBase.cxx | 6
framework/source/layoutmanager/layoutmanager.cxx | 3
include/comphelper/propertycontainerhelper.hxx | 6
reportdesign/source/core/api/ReportDefinition.cxx | 170 +++++++----------
sc/source/ui/unoobj/celllistsource.cxx | 5
sc/source/ui/unoobj/cellvaluebinding.cxx | 5
sc/source/ui/unoobj/chartuno.cxx | 4
9 files changed, 98 insertions(+), 119 deletions(-)
New commits:
commit bb1e59d596ffa29d40b4538e18a08e5e91d469a9
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 17 19:40:58 2016 +0200
Simplify OPropertyContainerHelper::registerPropertyNoMember's _pInitialValue
Change-Id: Ibfb27b3eded45e2646dada37ce3663f427985ae9
diff --git a/comphelper/source/property/propertybag.cxx b/comphelper/source/property/propertybag.cxx
index 7f32dd9..019c2b9 100644
--- a/comphelper/source/property/propertybag.cxx
+++ b/comphelper/source/property/propertybag.cxx
@@ -120,7 +120,7 @@ namespace comphelper
// register the property
OSL_ENSURE( _nAttributes & PropertyAttribute::MAYBEVOID, "PropertyBag::addVoidProperty: this is for default-void properties only!" );
- registerPropertyNoMember( _rName, _nHandle, _nAttributes | PropertyAttribute::MAYBEVOID, _rType, nullptr );
+ registerPropertyNoMember( _rName, _nHandle, _nAttributes | PropertyAttribute::MAYBEVOID, _rType, css::uno::Any() );
// remember the default
m_pImpl->aDefaults.insert( MapInt2Any::value_type( _nHandle, Any() ) );
@@ -143,7 +143,7 @@ namespace comphelper
// register the property
registerPropertyNoMember( _rName, _nHandle, _nAttributes, aPropertyType,
- _rInitialValue.hasValue() ? _rInitialValue.getValue() : nullptr );
+ _rInitialValue );
// remember the default
m_pImpl->aDefaults.insert( MapInt2Any::value_type( _nHandle, _rInitialValue ) );
diff --git a/comphelper/source/property/propertycontainerhelper.cxx b/comphelper/source/property/propertycontainerhelper.cxx
index 9122ba0..5e7fa4f 100644
--- a/comphelper/source/property/propertycontainerhelper.cxx
+++ b/comphelper/source/property/propertycontainerhelper.cxx
@@ -121,21 +121,21 @@ void OPropertyContainerHelper::registerMayBeVoidProperty(const OUString& _rName,
void OPropertyContainerHelper::registerPropertyNoMember(const OUString& _rName, sal_Int32 _nHandle, sal_Int32 _nAttributes,
- const Type& _rType, const void* _pInitialValue)
+ const Type& _rType, css::uno::Any const & _pInitialValue)
{
OSL_ENSURE(!_rType.equals(cppu::UnoType<Any>::get()),
"OPropertyContainerHelper::registerPropertyNoMember : don't give my the type of an uno::Any ! Really can't handle this !");
- OSL_ENSURE(_pInitialValue || ((_nAttributes & PropertyAttribute::MAYBEVOID) != 0),
- "OPropertyContainerHelper::registerPropertyNoMember : you should not omit the initial value if the property can't be void! This will definitively crash later!");
+ OSL_ENSURE(
+ (_pInitialValue.isExtractableTo(_rType)
+ || (!_pInitialValue.hasValue()
+ && (_nAttributes & PropertyAttribute::MAYBEVOID) != 0)),
+ "bad initial value");
PropertyDescription aNewProp;
aNewProp.aProperty = Property( _rName, _nHandle, _rType, (sal_Int16)_nAttributes );
aNewProp.eLocated = PropertyDescription::LocationType::HoldMyself;
aNewProp.aLocation.nOwnClassVectorIndex = m_aHoldProperties.size();
- if (_pInitialValue)
- m_aHoldProperties.push_back(Any(_pInitialValue, _rType));
- else
- m_aHoldProperties.push_back(Any());
+ m_aHoldProperties.push_back(_pInitialValue);
implPushBackProperty(aNewProp);
}
diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx
index a007159..3bfa9b1 100644
--- a/dbaccess/source/core/api/RowSetBase.cxx
+++ b/dbaccess/source/core/api/RowSetBase.cxx
@@ -96,10 +96,8 @@ ORowSetBase::ORowSetBase( const Reference<XComponentContext>& _rContext, ::cppu:
{
sal_Int32 nRBT = PropertyAttribute::READONLY | PropertyAttribute::BOUND | PropertyAttribute::TRANSIENT;
- sal_Int32 nInitialRowCountValue = 0;
- sal_Bool bInitialRowCountFinalValue( false );
- registerPropertyNoMember( PROPERTY_ROWCOUNT, PROPERTY_ID_ROWCOUNT, nRBT, cppu::UnoType<decltype(nInitialRowCountValue)>::get(), &nInitialRowCountValue );
- registerPropertyNoMember( PROPERTY_ISROWCOUNTFINAL, PROPERTY_ID_ISROWCOUNTFINAL, nRBT, cppu::UnoType<bool>::get(), &bInitialRowCountFinalValue );
+ registerPropertyNoMember( PROPERTY_ROWCOUNT, PROPERTY_ID_ROWCOUNT, nRBT, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny<sal_Int32>(0) );
+ registerPropertyNoMember( PROPERTY_ISROWCOUNTFINAL, PROPERTY_ID_ISROWCOUNTFINAL, nRBT, cppu::UnoType<bool>::get(), css::uno::Any(false) );
}
ORowSetBase::~ORowSetBase()
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 2ade77e..3dfab06 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -134,7 +134,6 @@ LayoutManager::LayoutManager( const Reference< XComponentContext >& xContext ) :
, m_xToolbarManager( nullptr )
{
// Initialize statusbar member
- const sal_Bool bRefreshVisibility = false;
m_aStatusBarElement.m_aType = "statusbar";
m_aStatusBarElement.m_aName = STATUS_BAR_ALIAS;
@@ -151,7 +150,7 @@ LayoutManager::LayoutManager( const Reference< XComponentContext >& xContext ) :
registerProperty( LAYOUTMANAGER_PROPNAME_ASCII_HIDECURRENTUI, LAYOUTMANAGER_PROPHANDLE_HIDECURRENTUI, beans::PropertyAttribute::TRANSIENT, &m_bHideCurrentUI, cppu::UnoType<decltype(m_bHideCurrentUI)>::get() );
registerProperty( LAYOUTMANAGER_PROPNAME_ASCII_LOCKCOUNT, LAYOUTMANAGER_PROPHANDLE_LOCKCOUNT, beans::PropertyAttribute::TRANSIENT | beans::PropertyAttribute::READONLY, &m_nLockCount, cppu::UnoType<decltype(m_nLockCount)>::get() );
registerProperty( LAYOUTMANAGER_PROPNAME_MENUBARCLOSER, LAYOUTMANAGER_PROPHANDLE_MENUBARCLOSER, beans::PropertyAttribute::TRANSIENT, &m_bMenuBarCloseButton, cppu::UnoType<decltype(m_bMenuBarCloseButton)>::get() );
- registerPropertyNoMember( LAYOUTMANAGER_PROPNAME_ASCII_REFRESHVISIBILITY, LAYOUTMANAGER_PROPHANDLE_REFRESHVISIBILITY, beans::PropertyAttribute::TRANSIENT, cppu::UnoType<decltype(bRefreshVisibility)>::get(), &bRefreshVisibility );
+ registerPropertyNoMember( LAYOUTMANAGER_PROPNAME_ASCII_REFRESHVISIBILITY, LAYOUTMANAGER_PROPHANDLE_REFRESHVISIBILITY, beans::PropertyAttribute::TRANSIENT, cppu::UnoType<bool>::get(), css::uno::Any(false) );
registerProperty( LAYOUTMANAGER_PROPNAME_ASCII_PRESERVE_CONTENT_SIZE, LAYOUTMANAGER_PROPHANDLE_PRESERVE_CONTENT_SIZE, beans::PropertyAttribute::TRANSIENT, &m_bPreserveContentSize, cppu::UnoType<decltype(m_bPreserveContentSize)>::get() );
}
diff --git a/include/comphelper/propertycontainerhelper.hxx b/include/comphelper/propertycontainerhelper.hxx
index 39bdcbf..513aa88 100644
--- a/include/comphelper/propertycontainerhelper.hxx
+++ b/include/comphelper/propertycontainerhelper.hxx
@@ -121,12 +121,12 @@ protected:
@param _nHandle the handle of the property
@param _nAttributes the attributes of the property
@param _rType the type of the property
- @param _pInitialValue the initial value of the property. May be null if _nAttributes includes
+ @param _pInitialValue the initial value of the property. May be void if _nAttributes includes
the css::beans::PropertyAttribute::MAYBEVOID flag.
- Else it must be a pointer to an object of the type described by _rType.
+ Else it must contain a value compatible with the type described by _rType.
*/
void registerPropertyNoMember(const OUString& _rName, sal_Int32 _nHandle, sal_Int32 _nAttributes,
- const css::uno::Type& _rType, const void* _pInitialValue);
+ const css::uno::Type& _rType, css::uno::Any const & _pInitialValue);
/** revokes a previously registered property
@throw css::beans::UnknownPropertyException
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index fb30a37..141338d 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -284,108 +284,92 @@ OStyle::OStyle()
m_aSize.Height = aDefaultSize.Height();
m_aSize.Width = aDefaultSize.Width();
- const style::GraphicLocation eGraphicLocation = style::GraphicLocation_NONE;
- const sal_Bool bFalse = false;
- const sal_Bool bTrue = true;
const sal_Int32 nMargin = 2000;
- //const sal_Int32 nColor = COL_WHITE;
- const sal_Int32 nTransparent = COL_TRANSPARENT;
- const sal_Int32 nZero = 0;
- const sal_Int16 n16Zero = 0;
- const sal_Int16 nNummeringType = style::NumberingType::ARABIC;
- const OUString sName("Default");
- const OUString sEmpty;
- const table::BorderLine2 eBorderLine(0,0,0,0,0,0);
- const table::ShadowFormat eShadowFormat(table::ShadowLocation_NONE,0,0,0);
- const style::PageStyleLayout ePageStyleLayout = style::PageStyleLayout_ALL;
const sal_Int32 nBound = beans::PropertyAttribute::BOUND;
const sal_Int32 nMayBeVoid = beans::PropertyAttribute::MAYBEVOID;
sal_Int32 i = 0;
- registerPropertyNoMember( PROPERTY_NAME, ++i, nBound, cppu::UnoType<OUString>::get(), &sName );
-
- registerPropertyNoMember(PROPERTY_BACKCOLOR, ++i,nBound, cppu::UnoType<sal_Int32>::get(), &nTransparent);
-
- registerPropertyNoMember(PROPERTY_BACKGRAPHICLOCATION, ++i,nBound, cppu::UnoType<style::GraphicLocation>::get(), &eGraphicLocation);
- registerPropertyNoMember(PROPERTY_BACKTRANSPARENT, ++i,nBound,cppu::UnoType<bool>::get() ,&bTrue);
- registerPropertyNoMember(SC_UNO_PAGE_BORDERDIST, ++i,nBound, cppu::UnoType<sal_Int32>::get(), &nZero);
- registerPropertyNoMember(SC_UNO_PAGE_BOTTBORDER, ++i,nBound, cppu::UnoType<table::BorderLine2>::get(), &eBorderLine);
- registerPropertyNoMember(SC_UNO_PAGE_BOTTBRDDIST, ++i,nBound, cppu::UnoType<sal_Int32>::get(), &nZero);
- registerPropertyNoMember(PROPERTY_BOTTOMMARGIN, ++i,nBound, cppu::UnoType<sal_Int32>::get(), &nMargin);
- registerPropertyNoMember("DisplayName", ++i,nBound, cppu::UnoType<OUString>::get(), &sEmpty);
- registerPropertyNoMember(SC_UNO_PAGE_FTRBACKCOL, ++i,nBound, cppu::UnoType<sal_Int32>::get(), &nTransparent);
- registerPropertyNoMember(SC_UNO_PAGE_FTRGRFFILT, ++i,nBound, cppu::UnoType<OUString>::get(), &sEmpty);
- registerPropertyNoMember(SC_UNO_PAGE_FTRGRFLOC, ++i,nBound, cppu::UnoType<style::GraphicLocation>::get(), &eGraphicLocation);
- registerPropertyNoMember(SC_UNO_PAGE_FTRGRFURL, ++i,nBound, cppu::UnoType<OUString>::get(), &sEmpty);
- registerPropertyNoMember(SC_UNO_PAGE_FTRBACKTRAN, ++i,nBound,cppu::UnoType<bool>::get() ,&bTrue);
- registerPropertyNoMember(SC_UNO_PAGE_FTRBODYDIST, ++i,nBound, cppu::UnoType<sal_Int32>::get(), &nZero);
- registerPropertyNoMember(SC_UNO_PAGE_FTRBRDDIST, ++i,nBound, cppu::UnoType<sal_Int32>::get(), &nZero);
- registerPropertyNoMember(SC_UNO_PAGE_FTRBOTTBOR, ++i,nBound, cppu::UnoType<table::BorderLine2>::get(), &eBorderLine);
- registerPropertyNoMember(SC_UNO_PAGE_FTRBOTTBDIS, ++i,nBound, cppu::UnoType<sal_Int32>::get(), &nZero);
- registerPropertyNoMember(SC_UNO_PAGE_FTRHEIGHT, ++i,nBound, cppu::UnoType<sal_Int32>::get(), &nZero);
- registerPropertyNoMember(SC_UNO_PAGE_FTRDYNAMIC, ++i,nBound,cppu::UnoType<bool>::get() ,&bFalse);
- registerPropertyNoMember(SC_UNO_PAGE_FTRON, ++i,nBound,cppu::UnoType<bool>::get() ,&bFalse);
- registerPropertyNoMember(SC_UNO_PAGE_FTRSHARED, ++i,nBound,cppu::UnoType<bool>::get() ,&bFalse);
- registerPropertyNoMember(SC_UNO_PAGE_FTRLEFTBOR, ++i,nBound, cppu::UnoType<table::BorderLine2>::get(), &eBorderLine);
- registerPropertyNoMember(SC_UNO_PAGE_FTRLEFTBDIS, ++i,nBound, cppu::UnoType<sal_Int32>::get(), &nZero);
- registerPropertyNoMember(SC_UNO_PAGE_FTRLEFTMAR, ++i,nBound, cppu::UnoType<sal_Int32>::get(), &nZero);
- registerPropertyNoMember(SC_UNO_PAGE_FTRRIGHTBOR, ++i,nBound, cppu::UnoType<table::BorderLine2>::get(), &eBorderLine);
- registerPropertyNoMember(SC_UNO_PAGE_FTRRIGHTBDIS,++i,nBound, cppu::UnoType<sal_Int32>::get(), &nZero);
- registerPropertyNoMember(SC_UNO_PAGE_FTRRIGHTMAR, ++i,nBound, cppu::UnoType<sal_Int32>::get(), &nZero);
- registerPropertyNoMember(SC_UNO_PAGE_FTRSHADOW, ++i,nBound, cppu::UnoType<table::ShadowFormat>::get(), &eShadowFormat);
- registerPropertyNoMember(SC_UNO_PAGE_FTRTOPBOR, ++i,nBound, cppu::UnoType<table::BorderLine2>::get(), &eBorderLine);
- registerPropertyNoMember(SC_UNO_PAGE_FTRTOPBDIS, ++i,nBound, cppu::UnoType<sal_Int32>::get(), &nZero);
-
- registerPropertyNoMember(SC_UNO_PAGE_HDRBACKCOL, ++i,nBound|nMayBeVoid, cppu::UnoType<sal_Int32>::get(), &nTransparent);
- registerPropertyNoMember(SC_UNO_PAGE_HDRGRFFILT, ++i,nBound|nMayBeVoid, cppu::UnoType<OUString>::get(), &sEmpty);
- registerPropertyNoMember(SC_UNO_PAGE_HDRGRFLOC, ++i,nBound|nMayBeVoid, cppu::UnoType<style::GraphicLocation>::get(), &eGraphicLocation);
- registerPropertyNoMember(SC_UNO_PAGE_HDRGRFURL, ++i,nBound|nMayBeVoid, cppu::UnoType<OUString>::get(), &sEmpty);
- registerPropertyNoMember(SC_UNO_PAGE_HDRBACKTRAN, ++i,nBound|nMayBeVoid,cppu::UnoType<bool>::get() ,&bTrue);
- registerPropertyNoMember(SC_UNO_PAGE_HDRBODYDIST, ++i,nBound|nMayBeVoid, cppu::UnoType<sal_Int32>::get(), &nZero);
- registerPropertyNoMember(SC_UNO_PAGE_HDRBRDDIST, ++i,nBound|nMayBeVoid, cppu::UnoType<sal_Int32>::get(), &nZero);
- registerPropertyNoMember(SC_UNO_PAGE_HDRBOTTBOR, ++i,nBound|nMayBeVoid, cppu::UnoType<table::BorderLine2>::get(), &eBorderLine);
- registerPropertyNoMember(SC_UNO_PAGE_HDRBOTTBDIS, ++i,nBound|nMayBeVoid, cppu::UnoType<sal_Int32>::get(), &nZero);
- registerPropertyNoMember(SC_UNO_PAGE_HDRHEIGHT, ++i,nBound|nMayBeVoid, cppu::UnoType<sal_Int32>::get(), &nZero);
- registerPropertyNoMember(SC_UNO_PAGE_HDRDYNAMIC, ++i,nBound|nMayBeVoid,cppu::UnoType<bool>::get() ,&bFalse);
- registerPropertyNoMember(SC_UNO_PAGE_HDRON, ++i,nBound|nMayBeVoid,cppu::UnoType<bool>::get() ,&bFalse);
- registerPropertyNoMember(SC_UNO_PAGE_HDRSHARED, ++i,nBound|nMayBeVoid,cppu::UnoType<bool>::get() ,&bFalse);
- registerPropertyNoMember(SC_UNO_PAGE_HDRLEFTBOR, ++i,nBound|nMayBeVoid, cppu::UnoType<table::BorderLine2>::get(), &eBorderLine);
- registerPropertyNoMember(SC_UNO_PAGE_HDRLEFTBDIS, ++i,nBound|nMayBeVoid, cppu::UnoType<sal_Int32>::get(), &nZero);
- registerPropertyNoMember(SC_UNO_PAGE_HDRLEFTMAR, ++i,nBound|nMayBeVoid, cppu::UnoType<sal_Int32>::get(), &nZero);
- registerPropertyNoMember(SC_UNO_PAGE_HDRRIGHTBOR, ++i,nBound|nMayBeVoid, cppu::UnoType<table::BorderLine2>::get(), &eBorderLine);
- registerPropertyNoMember(SC_UNO_PAGE_HDRRIGHTBDIS,++i,nBound|nMayBeVoid, cppu::UnoType<sal_Int32>::get(), &nZero);
- registerPropertyNoMember(SC_UNO_PAGE_HDRRIGHTMAR, ++i,nBound|nMayBeVoid, cppu::UnoType<sal_Int32>::get(), &nZero);
- registerPropertyNoMember(SC_UNO_PAGE_HDRSHADOW, ++i,nBound|nMayBeVoid, cppu::UnoType<table::ShadowFormat>::get(), &eShadowFormat);
- registerPropertyNoMember(SC_UNO_PAGE_HDRTOPBOR, ++i,nBound|nMayBeVoid, cppu::UnoType<table::BorderLine2>::get(), &eBorderLine);
- registerPropertyNoMember(SC_UNO_PAGE_HDRTOPBDIS, ++i,nBound|nMayBeVoid, cppu::UnoType<sal_Int32>::get(), &nZero);
+ registerPropertyNoMember( PROPERTY_NAME, ++i, nBound, cppu::UnoType<OUString>::get(), css::uno::Any(OUString("Default")) );
+
+ registerPropertyNoMember(PROPERTY_BACKCOLOR, ++i,nBound, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny<sal_Int32>(COL_TRANSPARENT));
+
+ registerPropertyNoMember(PROPERTY_BACKGRAPHICLOCATION, ++i,nBound, cppu::UnoType<style::GraphicLocation>::get(), css::uno::Any(style::GraphicLocation_NONE));
+ registerPropertyNoMember(PROPERTY_BACKTRANSPARENT, ++i,nBound,cppu::UnoType<bool>::get(), css::uno::Any(true));
+ registerPropertyNoMember(SC_UNO_PAGE_BORDERDIST, ++i,nBound, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny<sal_Int32>(0));
+ registerPropertyNoMember(SC_UNO_PAGE_BOTTBORDER, ++i,nBound, cppu::UnoType<table::BorderLine2>::get(), css::uno::Any(table::BorderLine2()));
+ registerPropertyNoMember(SC_UNO_PAGE_BOTTBRDDIST, ++i,nBound, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny<sal_Int32>(0));
+ registerPropertyNoMember(PROPERTY_BOTTOMMARGIN, ++i,nBound, cppu::UnoType<sal_Int32>::get(), css::uno::Any(nMargin));
+ registerPropertyNoMember("DisplayName", ++i,nBound, cppu::UnoType<OUString>::get(), css::uno::Any(OUString()));
+ registerPropertyNoMember(SC_UNO_PAGE_FTRBACKCOL, ++i,nBound, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny<sal_Int32>(COL_TRANSPARENT));
+ registerPropertyNoMember(SC_UNO_PAGE_FTRGRFFILT, ++i,nBound, cppu::UnoType<OUString>::get(), css::uno::Any(OUString()));
+ registerPropertyNoMember(SC_UNO_PAGE_FTRGRFLOC, ++i,nBound, cppu::UnoType<style::GraphicLocation>::get(), css::uno::Any(style::GraphicLocation_NONE));
+ registerPropertyNoMember(SC_UNO_PAGE_FTRGRFURL, ++i,nBound, cppu::UnoType<OUString>::get(), css::uno::Any(OUString()));
+ registerPropertyNoMember(SC_UNO_PAGE_FTRBACKTRAN, ++i,nBound,cppu::UnoType<bool>::get(), css::uno::Any(true));
+ registerPropertyNoMember(SC_UNO_PAGE_FTRBODYDIST, ++i,nBound, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny<sal_Int32>(0));
+ registerPropertyNoMember(SC_UNO_PAGE_FTRBRDDIST, ++i,nBound, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny<sal_Int32>(0));
+ registerPropertyNoMember(SC_UNO_PAGE_FTRBOTTBOR, ++i,nBound, cppu::UnoType<table::BorderLine2>::get(), css::uno::Any(table::BorderLine2()));
+ registerPropertyNoMember(SC_UNO_PAGE_FTRBOTTBDIS, ++i,nBound, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny<sal_Int32>(0));
+ registerPropertyNoMember(SC_UNO_PAGE_FTRHEIGHT, ++i,nBound, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny<sal_Int32>(0));
+ registerPropertyNoMember(SC_UNO_PAGE_FTRDYNAMIC, ++i,nBound,cppu::UnoType<bool>::get(), css::uno::Any(false));
+ registerPropertyNoMember(SC_UNO_PAGE_FTRON, ++i,nBound,cppu::UnoType<bool>::get(), css::uno::Any(false));
+ registerPropertyNoMember(SC_UNO_PAGE_FTRSHARED, ++i,nBound,cppu::UnoType<bool>::get(), css::uno::Any(false));
+ registerPropertyNoMember(SC_UNO_PAGE_FTRLEFTBOR, ++i,nBound, cppu::UnoType<table::BorderLine2>::get(), css::uno::Any(table::BorderLine2()));
+ registerPropertyNoMember(SC_UNO_PAGE_FTRLEFTBDIS, ++i,nBound, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny<sal_Int32>(0));
+ registerPropertyNoMember(SC_UNO_PAGE_FTRLEFTMAR, ++i,nBound, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny<sal_Int32>(0));
+ registerPropertyNoMember(SC_UNO_PAGE_FTRRIGHTBOR, ++i,nBound, cppu::UnoType<table::BorderLine2>::get(), css::uno::Any(table::BorderLine2()));
+ registerPropertyNoMember(SC_UNO_PAGE_FTRRIGHTBDIS,++i,nBound, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny<sal_Int32>(0));
+ registerPropertyNoMember(SC_UNO_PAGE_FTRRIGHTMAR, ++i,nBound, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny<sal_Int32>(0));
+ registerPropertyNoMember(SC_UNO_PAGE_FTRSHADOW, ++i,nBound, cppu::UnoType<table::ShadowFormat>::get(), css::uno::Any(table::ShadowFormat()));
+ registerPropertyNoMember(SC_UNO_PAGE_FTRTOPBOR, ++i,nBound, cppu::UnoType<table::BorderLine2>::get(), css::uno::Any(table::BorderLine2()));
+ registerPropertyNoMember(SC_UNO_PAGE_FTRTOPBDIS, ++i,nBound, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny<sal_Int32>(0));
+
+ registerPropertyNoMember(SC_UNO_PAGE_HDRBACKCOL, ++i,nBound|nMayBeVoid, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny<sal_Int32>(COL_TRANSPARENT));
+ registerPropertyNoMember(SC_UNO_PAGE_HDRGRFFILT, ++i,nBound|nMayBeVoid, cppu::UnoType<OUString>::get(), css::uno::Any(OUString()));
+ registerPropertyNoMember(SC_UNO_PAGE_HDRGRFLOC, ++i,nBound|nMayBeVoid, cppu::UnoType<style::GraphicLocation>::get(), css::uno::Any(style::GraphicLocation_NONE));
+ registerPropertyNoMember(SC_UNO_PAGE_HDRGRFURL, ++i,nBound|nMayBeVoid, cppu::UnoType<OUString>::get(), css::uno::Any(OUString()));
+ registerPropertyNoMember(SC_UNO_PAGE_HDRBACKTRAN, ++i,nBound|nMayBeVoid,cppu::UnoType<bool>::get(), css::uno::Any(true));
+ registerPropertyNoMember(SC_UNO_PAGE_HDRBODYDIST, ++i,nBound|nMayBeVoid, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny<sal_Int32>(0));
+ registerPropertyNoMember(SC_UNO_PAGE_HDRBRDDIST, ++i,nBound|nMayBeVoid, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny<sal_Int32>(0));
+ registerPropertyNoMember(SC_UNO_PAGE_HDRBOTTBOR, ++i,nBound|nMayBeVoid, cppu::UnoType<table::BorderLine2>::get(), css::uno::Any(table::BorderLine2()));
+ registerPropertyNoMember(SC_UNO_PAGE_HDRBOTTBDIS, ++i,nBound|nMayBeVoid, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny<sal_Int32>(0));
+ registerPropertyNoMember(SC_UNO_PAGE_HDRHEIGHT, ++i,nBound|nMayBeVoid, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny<sal_Int32>(0));
+ registerPropertyNoMember(SC_UNO_PAGE_HDRDYNAMIC, ++i,nBound|nMayBeVoid,cppu::UnoType<bool>::get(), css::uno::Any(false));
+ registerPropertyNoMember(SC_UNO_PAGE_HDRON, ++i,nBound|nMayBeVoid,cppu::UnoType<bool>::get(), css::uno::Any(false));
+ registerPropertyNoMember(SC_UNO_PAGE_HDRSHARED, ++i,nBound|nMayBeVoid,cppu::UnoType<bool>::get(), css::uno::Any(false));
+ registerPropertyNoMember(SC_UNO_PAGE_HDRLEFTBOR, ++i,nBound|nMayBeVoid, cppu::UnoType<table::BorderLine2>::get(), css::uno::Any(table::BorderLine2()));
+ registerPropertyNoMember(SC_UNO_PAGE_HDRLEFTBDIS, ++i,nBound|nMayBeVoid, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny<sal_Int32>(0));
+ registerPropertyNoMember(SC_UNO_PAGE_HDRLEFTMAR, ++i,nBound|nMayBeVoid, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny<sal_Int32>(0));
+ registerPropertyNoMember(SC_UNO_PAGE_HDRRIGHTBOR, ++i,nBound|nMayBeVoid, cppu::UnoType<table::BorderLine2>::get(), css::uno::Any(table::BorderLine2()));
+ registerPropertyNoMember(SC_UNO_PAGE_HDRRIGHTBDIS,++i,nBound|nMayBeVoid, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny<sal_Int32>(0));
+ registerPropertyNoMember(SC_UNO_PAGE_HDRRIGHTMAR, ++i,nBound|nMayBeVoid, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny<sal_Int32>(0));
+ registerPropertyNoMember(SC_UNO_PAGE_HDRSHADOW, ++i,nBound|nMayBeVoid, cppu::UnoType<table::ShadowFormat>::get(), css::uno::Any(table::ShadowFormat()));
+ registerPropertyNoMember(SC_UNO_PAGE_HDRTOPBOR, ++i,nBound|nMayBeVoid, cppu::UnoType<table::BorderLine2>::get(), css::uno::Any(table::BorderLine2()));
+ registerPropertyNoMember(SC_UNO_PAGE_HDRTOPBDIS, ++i,nBound|nMayBeVoid, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny<sal_Int32>(0));
registerProperty(PROPERTY_HEIGHT, ++i,nBound,&m_aSize.Height, ::cppu::UnoType<sal_Int32>::get() );
- registerPropertyNoMember(PROPERTY_ISLANDSCAPE, ++i,nBound, cppu::UnoType<bool>::get() ,&bFalse);
- registerPropertyNoMember(SC_UNO_PAGE_LEFTBORDER, ++i,nBound, cppu::UnoType<table::BorderLine2>::get(), &eBorderLine);
- registerPropertyNoMember(SC_UNO_PAGE_LEFTBRDDIST, ++i,nBound, cppu::UnoType<sal_Int32>::get(), &nZero);
- registerPropertyNoMember(PROPERTY_LEFTMARGIN, ++i,beans::PropertyAttribute::BOUND, ::cppu::UnoType<sal_Int32>::get(), &nMargin);
- registerPropertyNoMember(PROPERTY_NUMBERINGTYPE, ++i,nBound, cppu::UnoType<sal_Int16>::get(), &nNummeringType);
- registerPropertyNoMember(SC_UNO_PAGE_SCALEVAL, ++i,nBound, cppu::UnoType<sal_Int16>::get(), &n16Zero);
- registerPropertyNoMember(PROPERTY_PAGESTYLELAYOUT, ++i,nBound, cppu::UnoType<style::PageStyleLayout>::get(), &ePageStyleLayout);
- const OUString sPaperTray("[From printer settings]");
- registerPropertyNoMember(SC_UNO_PAGE_PAPERTRAY, ++i,nBound, cppu::UnoType<OUString>::get(), &sPaperTray);
- registerPropertyNoMember(SC_UNO_PAGE_RIGHTBORDER, ++i,nBound, cppu::UnoType<table::BorderLine2>::get(), &eBorderLine);
- registerPropertyNoMember(SC_UNO_PAGE_RIGHTBRDDIST,++i,nBound, cppu::UnoType<sal_Int32>::get(), &nZero);
- registerPropertyNoMember(PROPERTY_RIGHTMARGIN, ++i,beans::PropertyAttribute::BOUND,::cppu::UnoType<sal_Int32>::get(), &nMargin);
- registerPropertyNoMember(SC_UNO_PAGE_SCALETOPAG, ++i,nBound, cppu::UnoType<sal_Int16>::get(), &n16Zero);
- registerPropertyNoMember(SC_UNO_PAGE_SCALETOX, ++i,nBound, cppu::UnoType<sal_Int16>::get(), &n16Zero);
- registerPropertyNoMember(SC_UNO_PAGE_SCALETOY, ++i,nBound, cppu::UnoType<sal_Int16>::get(), &n16Zero);
- registerPropertyNoMember(SC_UNO_PAGE_SHADOWFORM, ++i,nBound, cppu::UnoType<table::ShadowFormat>::get(), &eShadowFormat);
+ registerPropertyNoMember(PROPERTY_ISLANDSCAPE, ++i,nBound, cppu::UnoType<bool>::get(), css::uno::Any(false));
+ registerPropertyNoMember(SC_UNO_PAGE_LEFTBORDER, ++i,nBound, cppu::UnoType<table::BorderLine2>::get(), css::uno::Any(table::BorderLine2()));
+ registerPropertyNoMember(SC_UNO_PAGE_LEFTBRDDIST, ++i,nBound, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny<sal_Int32>(0));
+ registerPropertyNoMember(PROPERTY_LEFTMARGIN, ++i,beans::PropertyAttribute::BOUND, ::cppu::UnoType<sal_Int32>::get(), css::uno::Any(nMargin));
+ registerPropertyNoMember(PROPERTY_NUMBERINGTYPE, ++i,nBound, cppu::UnoType<sal_Int16>::get(), css::uno::Any(style::NumberingType::ARABIC));
+ registerPropertyNoMember(SC_UNO_PAGE_SCALEVAL, ++i,nBound, cppu::UnoType<sal_Int16>::get(), css::uno::makeAny<sal_Int16>(0));
+ registerPropertyNoMember(PROPERTY_PAGESTYLELAYOUT, ++i,nBound, cppu::UnoType<style::PageStyleLayout>::get(), css::uno::Any(style::PageStyleLayout_ALL));
+ registerPropertyNoMember(SC_UNO_PAGE_PAPERTRAY, ++i,nBound, cppu::UnoType<OUString>::get(), css::uno::Any(OUString("[From printer settings]")));
+ registerPropertyNoMember(SC_UNO_PAGE_RIGHTBORDER, ++i,nBound, cppu::UnoType<table::BorderLine2>::get(), css::uno::Any(table::BorderLine2()));
+ registerPropertyNoMember(SC_UNO_PAGE_RIGHTBRDDIST,++i,nBound, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny<sal_Int32>(0));
+ registerPropertyNoMember(PROPERTY_RIGHTMARGIN, ++i,beans::PropertyAttribute::BOUND,::cppu::UnoType<sal_Int32>::get(), css::uno::Any(nMargin));
+ registerPropertyNoMember(SC_UNO_PAGE_SCALETOPAG, ++i,nBound, cppu::UnoType<sal_Int16>::get(), css::uno::makeAny<sal_Int16>(0));
+ registerPropertyNoMember(SC_UNO_PAGE_SCALETOX, ++i,nBound, cppu::UnoType<sal_Int16>::get(), css::uno::makeAny<sal_Int16>(0));
+ registerPropertyNoMember(SC_UNO_PAGE_SCALETOY, ++i,nBound, cppu::UnoType<sal_Int16>::get(), css::uno::makeAny<sal_Int16>(0));
+ registerPropertyNoMember(SC_UNO_PAGE_SHADOWFORM, ++i,nBound, cppu::UnoType<table::ShadowFormat>::get(), css::uno::Any(table::ShadowFormat()));
registerProperty(PROPERTY_PAPERSIZE, ++i,beans::PropertyAttribute::BOUND,&m_aSize, cppu::UnoType<awt::Size>::get() );
- registerPropertyNoMember(SC_UNO_PAGE_TOPBORDER, ++i,nBound, cppu::UnoType<table::BorderLine2>::get(), &eBorderLine);
- registerPropertyNoMember(SC_UNO_PAGE_TOPBRDDIST, ++i,nBound,::cppu::UnoType<sal_Int32>::get(), &nZero);
- registerPropertyNoMember(PROPERTY_TOPMARGIN, ++i,nBound,::cppu::UnoType<sal_Int32>::get(), &nMargin);
- uno::Reference< container::XNameContainer> xAttribs = ::comphelper::NameContainer_createInstance(cppu::UnoType<xml::AttributeData>::get());
- registerPropertyNoMember("UserDefinedAttributes", ++i,nBound, cppu::UnoType<container::XNameContainer>::get(), &xAttribs);
+ registerPropertyNoMember(SC_UNO_PAGE_TOPBORDER, ++i,nBound, cppu::UnoType<table::BorderLine2>::get(), css::uno::Any(table::BorderLine2()));
+ registerPropertyNoMember(SC_UNO_PAGE_TOPBRDDIST, ++i,nBound,::cppu::UnoType<sal_Int32>::get(), css::uno::makeAny<sal_Int32>(0));
+ registerPropertyNoMember(PROPERTY_TOPMARGIN, ++i,nBound,::cppu::UnoType<sal_Int32>::get(), css::uno::Any(nMargin));
+ registerPropertyNoMember("UserDefinedAttributes", ++i,nBound, cppu::UnoType<container::XNameContainer>::get(), css::uno::Any(comphelper::NameContainer_createInstance(cppu::UnoType<xml::AttributeData>::get())));
registerProperty(PROPERTY_WIDTH, ++i,nBound,&m_aSize.Width, cppu::UnoType<sal_Int32>::get() );
- registerPropertyNoMember("PrinterName", ++i,nBound, cppu::UnoType<OUString>::get(), &sEmpty);
- uno::Sequence<sal_Int8> aSe;
- registerPropertyNoMember("PrinterSetup", ++i,nBound,cppu::UnoType<uno::Sequence<sal_Int8>>::get(),&aSe);
+ registerPropertyNoMember("PrinterName", ++i,nBound, cppu::UnoType<OUString>::get(), css::uno::Any(OUString()));
+ registerPropertyNoMember("PrinterSetup", ++i,nBound,cppu::UnoType<uno::Sequence<sal_Int8>>::get(), css::uno::Any(uno::Sequence<sal_Int8>()));
}
diff --git a/sc/source/ui/unoobj/celllistsource.cxx b/sc/source/ui/unoobj/celllistsource.cxx
index f6908f2..b00ea8a 100644
--- a/sc/source/ui/unoobj/celllistsource.cxx
+++ b/sc/source/ui/unoobj/celllistsource.cxx
@@ -52,13 +52,12 @@ namespace calc
OSL_PRECOND( m_xDocument.is(), "OCellListSource::OCellListSource: invalid document!" );
// register our property at the base class
- CellRangeAddress aInitialPropValue;
registerPropertyNoMember(
"CellRange",
PROP_HANDLE_RANGE_ADDRESS,
PropertyAttribute::BOUND | PropertyAttribute::READONLY,
- cppu::UnoType<decltype(aInitialPropValue)>::get(),
- &aInitialPropValue
+ cppu::UnoType<CellRangeAddress>::get(),
+ css::uno::Any(CellRangeAddress())
);
}
diff --git a/sc/source/ui/unoobj/cellvaluebinding.cxx b/sc/source/ui/unoobj/cellvaluebinding.cxx
index a039413..3b301d0 100644
--- a/sc/source/ui/unoobj/cellvaluebinding.cxx
+++ b/sc/source/ui/unoobj/cellvaluebinding.cxx
@@ -56,13 +56,12 @@ namespace calc
,m_bListPos( _bListPos )
{
// register our property at the base class
- CellAddress aInitialPropValue;
registerPropertyNoMember(
"BoundCell",
PROP_HANDLE_BOUND_CELL,
PropertyAttribute::BOUND | PropertyAttribute::READONLY,
- cppu::UnoType<decltype(aInitialPropValue)>::get(),
- &aInitialPropValue
+ cppu::UnoType<CellAddress>::get(),
+ css::uno::Any(CellAddress())
);
// TODO: implement a ReadOnly property as required by the service,
diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx
index 9809f4b..b974560 100644
--- a/sc/source/ui/unoobj/chartuno.cxx
+++ b/sc/source/ui/unoobj/chartuno.cxx
@@ -450,10 +450,10 @@ ScChartObj::ScChartObj(ScDocShell* pDocSh, SCTAB nT, const OUString& rN)
{
pDocShell->GetDocument().AddUnoObject(*this);
- uno::Sequence< table::CellRangeAddress > aInitialPropValue;
registerPropertyNoMember( "RelatedCellRanges",
PROP_HANDLE_RELATED_CELLRANGES, beans::PropertyAttribute::MAYBEVOID,
- cppu::UnoType<decltype(aInitialPropValue)>::get(), &aInitialPropValue );
+ cppu::UnoType<uno::Sequence<table::CellRangeAddress>>::get(),
+ css::uno::Any(uno::Sequence<table::CellRangeAddress>()) );
}
ScChartObj::~ScChartObj()
More information about the Libreoffice-commits
mailing list