summaryrefslogtreecommitdiff
path: root/sw/source/core/unocore
diff options
context:
space:
mode:
authorOliver Specht <os@openoffice.org>2000-10-24 14:12:56 +0000
committerOliver Specht <os@openoffice.org>2000-10-24 14:12:56 +0000
commit33a00f386e0fc3bb2f9c85a14f21addc2681d323 (patch)
tree7ed08ccfff53cc600eb83ee7f8bc1c259b2d235f /sw/source/core/unocore
parent750165f774a3167e1c47cf1db7764bd5dc50c79f (diff)
#79740# model creates service .text.TextColumns
Diffstat (limited to 'sw/source/core/unocore')
-rw-r--r--sw/source/core/unocore/unocoll.cxx10
-rw-r--r--sw/source/core/unocore/unosett.cxx22
2 files changed, 24 insertions, 8 deletions
diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx
index 0c23c08b9552..b3e893e337ee 100644
--- a/sw/source/core/unocore/unocoll.cxx
+++ b/sw/source/core/unocore/unocoll.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unocoll.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: os $ $Date: 2000-10-16 13:33:49 $
+ * last change: $Author: os $ $Date: 2000-10-24 15:12:56 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -273,7 +273,8 @@ const char* __FAR_DATA aProvNames[] =
"com.sun.star.text.TextField.InputUser", //SW_SERVICE_FIELDTYPE_INPUT_USER
"com.sun.star.text.TextField.HiddenText", //SW_SERVICE_FIELDTYPE_HIDDEN_TEXT
"com.sun.star.style.ConditionalParagraphStyle", //SW_SERVICE_STYLE_CONDITIONAL_PARAGRAPH_STYLE
- "com.sun.star.text.NumberingRules" //SW_SERVICE_NUMBERING_RULES
+ "com.sun.star.text.NumberingRules", //SW_SERVICE_NUMBERING_RULES
+ "com.sun.star.text.TextColumns" //SW_SERVICE_TEXT_COLUMNS
};
/******************************************************************
* SwXServiceProvider
@@ -531,6 +532,9 @@ uno::Reference< uno::XInterface > SwXServiceProvider::MakeInstance(sal_uInt16
case SW_SERVICE_NUMBERING_RULES :
xRet = (cppu::OWeakObject*)new SwXNumberingRules(*pDoc);
break;
+ case SW_SERVICE_TEXT_COLUMNS :
+ xRet = (cppu::OWeakObject*)new SwXTextColumns(0);
+ break;
// case SW_SERVICE_FIELDTYPE_TABLEFIELD:
default:
throw uno::RuntimeException();
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index 258ec2720169..950e1a0662d3 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unosett.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: mib $ $Date: 2000-10-23 09:18:49 $
+ * last change: $Author: os $ $Date: 2000-10-24 15:12:56 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -2321,7 +2321,7 @@ OUString SwXTextColumns::getImplementationName(void) throw( RuntimeException )
---------------------------------------------------------------------------*/
BOOL SwXTextColumns::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
- return C2U("com.sun.star.text.XTextColumns") == rServiceName;
+ return C2U("com.sun.star.text.TextColumns") == rServiceName;
}
/* -----------------------------06.04.00 11:47--------------------------------
@@ -2330,9 +2330,18 @@ Sequence< OUString > SwXTextColumns::getSupportedServiceNames(void) throw( Runti
{
Sequence< OUString > aRet(1);
OUString* pArray = aRet.getArray();
- pArray[0] = C2U("com.sun.star.text.XTextColumns");
+ pArray[0] = C2U("com.sun.star.text.TextColumns");
return aRet;
}
+/* -----------------------------24.10.00 16:45--------------------------------
+
+ ---------------------------------------------------------------------------*/
+SwXTextColumns::SwXTextColumns(sal_uInt16 nColCount) :
+ nReference(0)
+{
+ if(nColCount)
+ setColumnCount(nColCount);
+}
/*-- 16.12.98 14:06:53---------------------------------------------------
-----------------------------------------------------------------------*/
@@ -2387,7 +2396,7 @@ void SwXTextColumns::setColumnCount(sal_Int16 nColumns) throw( uno::RuntimeExcep
if(nColumns <= 0)
throw uno::RuntimeException();
aTextColumns.realloc(nColumns);
- text::TextColumn* pCols = aTextColumns.getArray();
+ text::TextColumn* pCols = aTextColumns.getArray();
nReference = USHRT_MAX;
sal_uInt16 nWidth = nReference / nColumns;
sal_uInt16 nDiff = nReference - nWidth * nColumns;
@@ -2430,6 +2439,9 @@ void SwXTextColumns::setColumns(const uno::Sequence< text::TextColumn >& rColumn
/*------------------------------------------------------------------------
$Log: not supported by cvs2svn $
+ Revision 1.7 2000/10/23 09:18:49 mib
+ bug fixes for numbering rules
+
Revision 1.6 2000/10/19 13:59:53 os
check numbering type of footnotes