Kaydet (Commit) 560111ef authored tarafından Daniel Vogelheim's avatar Daniel Vogelheim

- added: API for combined characters text field completed

üst d161a835
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: unocoll.hxx,v $ * $RCSfile: unocoll.hxx,v $
* *
* $Revision: 1.6 $ * $Revision: 1.7 $
* *
* last change: $Author: os $ $Date: 2001-01-12 16:25:45 $ * last change: $Author: dvo $ $Date: 2001-01-29 15:29:29 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -213,7 +213,7 @@ class SwUnoCollection ...@@ -213,7 +213,7 @@ class SwUnoCollection
#define SW_SERVICE_FIELDTYPE_DOCINFO_TITLE 70 #define SW_SERVICE_FIELDTYPE_DOCINFO_TITLE 70
#define SW_SERVICE_FIELDTYPE_DOCINFO_REVISION 71 #define SW_SERVICE_FIELDTYPE_DOCINFO_REVISION 71
#define SW_SERVICE_FIELDTYPE_BIBLIOGRAPHY 72 #define SW_SERVICE_FIELDTYPE_BIBLIOGRAPHY 72
#define SW_SERVICE_FIELDTYPE_DUMMY_2 73 #define SW_SERVICE_FIELDTYPE_COMBINED_CHARACTERS 73
#define SW_SERVICE_FIELDTYPE_DUMMY_3 74 #define SW_SERVICE_FIELDTYPE_DUMMY_3 74
#define SW_SERVICE_FIELDTYPE_DUMMY_4 75 #define SW_SERVICE_FIELDTYPE_DUMMY_4 75
#define SW_SERVICE_FIELDTYPE_DUMMY_5 76 #define SW_SERVICE_FIELDTYPE_DUMMY_5 76
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: unocoll.cxx,v $ * $RCSfile: unocoll.cxx,v $
* *
* $Revision: 1.10 $ * $Revision: 1.11 $
* *
* last change: $Author: os $ $Date: 2001-01-12 16:12:45 $ * last change: $Author: dvo $ $Date: 2001-01-29 15:29:30 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -248,7 +248,7 @@ const char* __FAR_DATA aProvNames[] = ...@@ -248,7 +248,7 @@ const char* __FAR_DATA aProvNames[] =
"com.sun.star.text.TextField.DocInfo.Title", //SW_SERVICE_FIELDTYPE_DOCINFO_TITLE "com.sun.star.text.TextField.DocInfo.Title", //SW_SERVICE_FIELDTYPE_DOCINFO_TITLE
"com.sun.star.text.TextField.DocInfo.Revision", //SW_SERVICE_FIELDTYPE_DOCINFO_REVISION "com.sun.star.text.TextField.DocInfo.Revision", //SW_SERVICE_FIELDTYPE_DOCINFO_REVISION
"com.sun.star.text.TextField.Bibliography",//SW_SERVICE_FIELDTYPE_BIBLIOGRAPHY "com.sun.star.text.TextField.Bibliography",//SW_SERVICE_FIELDTYPE_BIBLIOGRAPHY
"",//SW_SERVICE_FIELDTYPE_DUMMY_2 "com.sun.star.text.TextField.CombinedCharacters",//SW_SERVICE_FIELDTYPE_COMBINED_CHARACTERS
"",//SW_SERVICE_FIELDTYPE_DUMMY_3 "",//SW_SERVICE_FIELDTYPE_DUMMY_3
"",//SW_SERVICE_FIELDTYPE_DUMMY_4 "",//SW_SERVICE_FIELDTYPE_DUMMY_4
"",//SW_SERVICE_FIELDTYPE_DUMMY_5 "",//SW_SERVICE_FIELDTYPE_DUMMY_5
...@@ -512,6 +512,7 @@ uno::Reference< uno::XInterface > SwXServiceProvider::MakeInstance(sal_uInt16 ...@@ -512,6 +512,7 @@ uno::Reference< uno::XInterface > SwXServiceProvider::MakeInstance(sal_uInt16
case SW_SERVICE_FIELDTYPE_BIBLIOGRAPHY: case SW_SERVICE_FIELDTYPE_BIBLIOGRAPHY:
case SW_SERVICE_FIELDTYPE_INPUT_USER : case SW_SERVICE_FIELDTYPE_INPUT_USER :
case SW_SERVICE_FIELDTYPE_HIDDEN_TEXT : case SW_SERVICE_FIELDTYPE_HIDDEN_TEXT :
case SW_SERVICE_FIELDTYPE_COMBINED_CHARACTERS :
xRet = (cppu::OWeakObject*)new SwXTextField(nObjectType); xRet = (cppu::OWeakObject*)new SwXTextField(nObjectType);
break; break;
case SW_SERVICE_FIELDMASTER_USER: case SW_SERVICE_FIELDMASTER_USER:
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: unofield.cxx,v $ * $RCSfile: unofield.cxx,v $
* *
* $Revision: 1.17 $ * $Revision: 1.18 $
* *
* last change: $Author: os $ $Date: 2001-01-15 15:57:11 $ * last change: $Author: dvo $ $Date: 2001-01-29 15:29:30 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -719,7 +719,16 @@ const SfxItemPropertyMap* SwFieldPropMapProvider::GetPropertyMap(USHORT nService ...@@ -719,7 +719,16 @@ const SfxItemPropertyMap* SwFieldPropMapProvider::GetPropertyMap(USHORT nService
} }
break; break;
case SW_SERVICE_FIELDTYPE_DUMMY_0 : case SW_SERVICE_FIELDTYPE_DUMMY_0 :
case SW_SERVICE_FIELDTYPE_DUMMY_2: case SW_SERVICE_FIELDTYPE_COMBINED_CHARACTERS:
{
static SfxItemPropertyMap aCombinedCharactersPropMap[] =
{
{SW_PROP_NAME(UNO_NAME_CONTENT), FIELD_PROP_PAR1, &::getCppuType((const OUString*)0), PROPERTY_NONE, 0},
{0,0,0,0}
};
pRet = aCombinedCharactersPropMap;
}
break;
case SW_SERVICE_FIELDTYPE_DUMMY_3: case SW_SERVICE_FIELDTYPE_DUMMY_3:
case SW_SERVICE_FIELDTYPE_DUMMY_4: case SW_SERVICE_FIELDTYPE_DUMMY_4:
case SW_SERVICE_FIELDTYPE_DUMMY_5: case SW_SERVICE_FIELDTYPE_DUMMY_5:
...@@ -935,6 +944,7 @@ const ServiceIdResId aServiceToRes[] = ...@@ -935,6 +944,7 @@ const ServiceIdResId aServiceToRes[] =
{RES_INPUTFLD, SW_SERVICE_FIELDTYPE_INPUT_USER }, {RES_INPUTFLD, SW_SERVICE_FIELDTYPE_INPUT_USER },
{RES_HIDDENTXTFLD, SW_SERVICE_FIELDTYPE_HIDDEN_TEXT }, {RES_HIDDENTXTFLD, SW_SERVICE_FIELDTYPE_HIDDEN_TEXT },
{RES_AUTHORITY, SW_SERVICE_FIELDTYPE_BIBLIOGRAPHY }, {RES_AUTHORITY, SW_SERVICE_FIELDTYPE_BIBLIOGRAPHY },
{RES_COMBINED_CHARS, SW_SERVICE_FIELDTYPE_COMBINED_CHARACTERS },
{USHRT_MAX, USHRT_MAX } {USHRT_MAX, USHRT_MAX }
}; };
//----------------------------------------------------------------- //-----------------------------------------------------------------
...@@ -2153,6 +2163,19 @@ void SwXTextField::attachToRange( ...@@ -2153,6 +2163,19 @@ void SwXTextField::attachToRange(
} }
} }
break; break;
case SW_SERVICE_FIELDTYPE_COMBINED_CHARACTERS:
{
// get or create field type
SwFieldType* pFldType = pDoc->GetFldType(RES_COMBINED_CHARS,
aEmptyStr);
if(NULL == pFldType)
pFldType = pDoc->InsertFldType(SwCombinedCharFieldType());
// create field
pFld = new SwCombinedCharField(
(SwCombinedCharFieldType*)pFldType, m_pProps->sPar1);
}
break;
default: DBG_ERROR("was ist das fuer ein Typ?"); default: DBG_ERROR("was ist das fuer ein Typ?");
} }
if(pFld) if(pFld)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment