summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/inc/styleuno.hxx10
-rw-r--r--sc/inc/unonames.hxx6
-rw-r--r--sc/inc/unowids.hxx7
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx26
-rw-r--r--sc/source/ui/unoobj/styleuno.cxx14
5 files changed, 52 insertions, 11 deletions
diff --git a/sc/inc/styleuno.hxx b/sc/inc/styleuno.hxx
index 001228eee..ab40b5eea 100644
--- a/sc/inc/styleuno.hxx
+++ b/sc/inc/styleuno.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: styleuno.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: nn $ $Date: 2001-04-25 18:54:42 $
+ * last change: $Author: nn $ $Date: 2001-05-23 18:20:49 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -89,6 +89,9 @@
#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
#include <com/sun/star/container/XNameContainer.hpp>
#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XINDEXREPLACE_HPP_
+#include <com/sun/star/container/XIndexReplace.hpp>
+#endif
#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
#endif
@@ -297,6 +300,9 @@ public:
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+ static ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexReplace >
+ CreateEmptyNumberingRules();
+
// XStyle
virtual sal_Bool SAL_CALL isUserDefined() throw(::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL isInUse() throw(::com::sun::star::uno::RuntimeException);
diff --git a/sc/inc/unonames.hxx b/sc/inc/unonames.hxx
index 895c072a3..2e4c935e8 100644
--- a/sc/inc/unonames.hxx
+++ b/sc/inc/unonames.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unonames.hxx,v $
*
- * $Revision: 1.31 $
+ * $Revision: 1.32 $
*
- * last change: $Author: nn $ $Date: 2001-05-23 17:25:45 $
+ * last change: $Author: nn $ $Date: 2001-05-23 18:20:49 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -147,6 +147,8 @@
#define SC_UNONAME_PADJUST "ParaAdjust"
#define SC_UNONAME_PLASTADJ "ParaLastLineAdjust"
+#define SC_UNONAME_NUMRULES "NumberingRules"
+
// Styles
#define SC_UNONAME_DISPNAME "DisplayName"
diff --git a/sc/inc/unowids.hxx b/sc/inc/unowids.hxx
index 801670424..ea0268220 100644
--- a/sc/inc/unowids.hxx
+++ b/sc/inc/unowids.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unowids.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: nn $ $Date: 2001-04-25 18:48:34 $
+ * last change: $Author: nn $ $Date: 2001-05-23 18:20:49 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -104,8 +104,9 @@
#define SC_WID_UNO_DISPNAME ( SC_WID_UNO_START + 25 )
#define SC_WID_UNO_HEADERSET ( SC_WID_UNO_START + 26 )
#define SC_WID_UNO_FOOTERSET ( SC_WID_UNO_START + 27 )
+#define SC_WID_UNO_NUMRULES ( SC_WID_UNO_START + 28 )
-#define SC_WID_UNO_END ( SC_WID_UNO_START + 27 )
+#define SC_WID_UNO_END ( SC_WID_UNO_START + 28 )
inline BOOL IsScUnoWid( USHORT nWid )
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 7b235b62f..bda91ffab 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: cellsuno.cxx,v $
*
- * $Revision: 1.39 $
+ * $Revision: 1.40 $
*
- * last change: $Author: nn $ $Date: 2001-05-23 17:27:00 $
+ * last change: $Author: nn $ $Date: 2001-05-23 18:22:49 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -248,6 +248,7 @@ const SfxItemPropertyMap* lcl_GetCellsPropertyMap()
{MAP_CHAR_LEN(SC_UNONAME_WRAP), ATTR_LINEBREAK, &getBooleanCppuType(), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_LEFTBORDER),ATTR_BORDER, &::getCppuType((const table::BorderLine*)0), 0, LEFT_BORDER | CONVERT_TWIPS },
{MAP_CHAR_LEN(SC_UNONAME_NUMFMT), ATTR_VALUE_FORMAT, &getCppuType((sal_Int32*)0), 0, 0 },
+ {MAP_CHAR_LEN(SC_UNONAME_NUMRULES), SC_WID_UNO_NUMRULES,&getCppuType((const uno::Reference<container::XIndexReplace>*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_CELLORI), ATTR_ORIENTATION, &getCppuType((table::CellOrientation*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_PADJUST), ATTR_HOR_JUSTIFY, &::getCppuType((const sal_Int16*)0), 0, MID_HORJUST_ADJUST },
{MAP_CHAR_LEN(SC_UNONAME_PBMARGIN), ATTR_MARGIN, &getCppuType((sal_Int32*)0), 0, MID_MARGIN_LO_MARGIN | CONVERT_TWIPS },
@@ -335,6 +336,7 @@ const SfxItemPropertyMap* lcl_GetRangePropertyMap()
{MAP_CHAR_LEN(SC_UNONAME_WRAP), ATTR_LINEBREAK, &getBooleanCppuType(), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_LEFTBORDER),ATTR_BORDER, &::getCppuType((const table::BorderLine*)0), 0, LEFT_BORDER | CONVERT_TWIPS },
{MAP_CHAR_LEN(SC_UNONAME_NUMFMT), ATTR_VALUE_FORMAT, &getCppuType((sal_Int32*)0), 0, 0 },
+ {MAP_CHAR_LEN(SC_UNONAME_NUMRULES), SC_WID_UNO_NUMRULES,&getCppuType((const uno::Reference<container::XIndexReplace>*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_CELLORI), ATTR_ORIENTATION, &getCppuType((table::CellOrientation*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_PADJUST), ATTR_HOR_JUSTIFY, &::getCppuType((const sal_Int16*)0), 0, MID_HORJUST_ADJUST },
{MAP_CHAR_LEN(SC_UNONAME_PBMARGIN), ATTR_MARGIN, &getCppuType((sal_Int32*)0), 0, MID_MARGIN_LO_MARGIN | CONVERT_TWIPS },
@@ -426,6 +428,7 @@ const SfxItemPropertyMap* lcl_GetCellPropertyMap()
{MAP_CHAR_LEN(SC_UNONAME_WRAP), ATTR_LINEBREAK, &getBooleanCppuType(), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_LEFTBORDER),ATTR_BORDER, &::getCppuType((const table::BorderLine*)0), 0, LEFT_BORDER | CONVERT_TWIPS },
{MAP_CHAR_LEN(SC_UNONAME_NUMFMT), ATTR_VALUE_FORMAT, &getCppuType((sal_Int32*)0), 0, 0 },
+ {MAP_CHAR_LEN(SC_UNONAME_NUMRULES), SC_WID_UNO_NUMRULES,&getCppuType((const uno::Reference<container::XIndexReplace>*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_CELLORI), ATTR_ORIENTATION, &getCppuType((table::CellOrientation*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_PADJUST), ATTR_HOR_JUSTIFY, &::getCppuType((const sal_Int16*)0), 0, MID_HORJUST_ADJUST },
{MAP_CHAR_LEN(SC_UNONAME_PBMARGIN), ATTR_MARGIN, &getCppuType((sal_Int32*)0), 0, MID_MARGIN_LO_MARGIN | CONVERT_TWIPS },
@@ -519,6 +522,7 @@ const SfxItemPropertyMap* lcl_GetColumnPropertyMap()
{MAP_CHAR_LEN(SC_UNONAME_CELLVIS), SC_WID_UNO_CELLVIS, &getBooleanCppuType(), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_LEFTBORDER),ATTR_BORDER, &::getCppuType((const table::BorderLine*)0), 0, LEFT_BORDER | CONVERT_TWIPS },
{MAP_CHAR_LEN(SC_UNONAME_NUMFMT), ATTR_VALUE_FORMAT, &getCppuType((sal_Int32*)0), 0, 0 },
+ {MAP_CHAR_LEN(SC_UNONAME_NUMRULES), SC_WID_UNO_NUMRULES,&getCppuType((const uno::Reference<container::XIndexReplace>*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_OWIDTH), SC_WID_UNO_OWIDTH, &getBooleanCppuType(), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_CELLORI), ATTR_ORIENTATION, &getCppuType((table::CellOrientation*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_PADJUST), ATTR_HOR_JUSTIFY, &::getCppuType((const sal_Int16*)0), 0, MID_HORJUST_ADJUST },
@@ -612,6 +616,7 @@ const SfxItemPropertyMap* lcl_GetRowPropertyMap()
{MAP_CHAR_LEN(SC_UNONAME_CELLVIS), SC_WID_UNO_CELLVIS, &getBooleanCppuType(), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_LEFTBORDER),ATTR_BORDER, &::getCppuType((const table::BorderLine*)0), 0, LEFT_BORDER | CONVERT_TWIPS },
{MAP_CHAR_LEN(SC_UNONAME_NUMFMT), ATTR_VALUE_FORMAT, &getCppuType((sal_Int32*)0), 0, 0 },
+ {MAP_CHAR_LEN(SC_UNONAME_NUMRULES), SC_WID_UNO_NUMRULES,&getCppuType((const uno::Reference<container::XIndexReplace>*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_OHEIGHT), SC_WID_UNO_OHEIGHT, &getBooleanCppuType(), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_CELLORI), ATTR_ORIENTATION, &getCppuType((table::CellOrientation*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_PADJUST), ATTR_HOR_JUSTIFY, &::getCppuType((const sal_Int16*)0), 0, MID_HORJUST_ADJUST },
@@ -702,6 +707,7 @@ const SfxItemPropertyMap* lcl_GetSheetPropertyMap()
{MAP_CHAR_LEN(SC_UNO_LINKDISPBIT), SC_WID_UNO_LINKDISPBIT,&getCppuType((uno::Reference<awt::XBitmap>*)0), 0 | beans::PropertyAttribute::READONLY, 0 },
{MAP_CHAR_LEN(SC_UNO_LINKDISPNAME), SC_WID_UNO_LINKDISPNAME,&getCppuType((rtl::OUString*)0), 0 | beans::PropertyAttribute::READONLY, 0 },
{MAP_CHAR_LEN(SC_UNONAME_NUMFMT), ATTR_VALUE_FORMAT, &getCppuType((sal_Int32*)0), 0, 0 },
+ {MAP_CHAR_LEN(SC_UNONAME_NUMRULES), SC_WID_UNO_NUMRULES,&getCppuType((const uno::Reference<container::XIndexReplace>*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_CELLORI), ATTR_ORIENTATION, &getCppuType((table::CellOrientation*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_PAGESTL), SC_WID_UNO_PAGESTL, &getCppuType((rtl::OUString*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_PADJUST), ATTR_HOR_JUSTIFY, &::getCppuType((const sal_Int16*)0), 0, MID_HORJUST_ADJUST },
@@ -1551,6 +1557,8 @@ beans::PropertyState ScCellRangesBase::GetOnePropertyState( USHORT nItemWhich, c
else
eRet = beans::PropertyState_AMBIGUOUS_VALUE;
}
+ else if ( pMap->nWID == SC_WID_UNO_NUMRULES )
+ eRet = beans::PropertyState_DEFAULT_VALUE; // numbering rules are always default
}
return eRet;
}
@@ -1735,6 +1743,12 @@ uno::Any SAL_CALL ScCellRangesBase::getPropertyDefault( const rtl::OUString& aPr
aAny <<= xObj;
}
break;
+ case SC_WID_UNO_NUMRULES:
+ {
+ uno::Reference<container::XIndexReplace> xObj = ScStyleObj::CreateEmptyNumberingRules();
+ aAny <<= xObj;
+ }
+ break;
}
}
}
@@ -2006,6 +2020,7 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertyMap* pMap, cons
}
}
break;
+ // SC_WID_UNO_NUMRULES is ignored...
}
}
}
@@ -2165,6 +2180,13 @@ uno::Any ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertyMap* pMap )
}
}
break;
+ case SC_WID_UNO_NUMRULES:
+ {
+ // always return empty numbering rules object
+ uno::Reference<container::XIndexReplace> xObj = ScStyleObj::CreateEmptyNumberingRules();
+ aAny <<= xObj;
+ }
+ break;
}
}
return aAny;
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index 86372bfc0..2a51afeef 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: styleuno.cxx,v $
*
- * $Revision: 1.20 $
+ * $Revision: 1.21 $
*
- * last change: $Author: nn $ $Date: 2001-05-23 17:27:00 $
+ * last change: $Author: nn $ $Date: 2001-05-23 18:22:49 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -68,8 +68,10 @@
#include "scitems.hxx"
#include <svx/algitem.hxx>
#include <svx/langitem.hxx>
+#include <svx/numitem.hxx>
#include <svx/pageitem.hxx>
#include <svx/unomid.hxx>
+#include <svx/unonrule.hxx>
#include <sfx2/bindings.hxx>
#include <vcl/virdev.hxx>
#include <svtools/itempool.hxx>
@@ -161,6 +163,7 @@ const SfxItemPropertyMap* lcl_GetCellStyleMap()
{MAP_CHAR_LEN(SC_UNONAME_WRAP), ATTR_LINEBREAK, &::getBooleanCppuType(), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_LEFTBORDER),ATTR_BORDER, &::getCppuType((const table::BorderLine*)0), 0, LEFT_BORDER | CONVERT_TWIPS },
{MAP_CHAR_LEN(SC_UNONAME_NUMFMT), ATTR_VALUE_FORMAT, &::getCppuType((const sal_Int32*)0), 0, 0 },
+// {MAP_CHAR_LEN(SC_UNONAME_NUMRULES), SC_WID_UNO_NUMRULES,&getCppuType((const uno::Reference<container::XIndexReplace>*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_CELLORI), ATTR_ORIENTATION, &::getCppuType((const table::CellOrientation*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_PADJUST), ATTR_HOR_JUSTIFY, &::getCppuType((const sal_Int16*)0), 0, MID_HORJUST_ADJUST },
{MAP_CHAR_LEN(SC_UNONAME_PBMARGIN), ATTR_MARGIN, &::getCppuType((const sal_Int32*)0), 0, MID_MARGIN_LO_MARGIN | CONVERT_TWIPS },
@@ -1206,6 +1209,13 @@ void SAL_CALL ScStyleObj::setName( const rtl::OUString& aNewName )
}
}
+// static
+uno::Reference<container::XIndexReplace> ScStyleObj::CreateEmptyNumberingRules()
+{
+ SvxNumRule aRule( 0, 0, TRUE ); // nothing supported
+ return SvxCreateNumRule( &aRule );
+}
+
// beans::XPropertyState
const SfxItemSet* ScStyleObj::GetStyleItemSet_Impl( const String& rPropName,