#99877# properties for new service DocumentIndexMarkAsian added

This commit is contained in:
Thomas Lange 2002-06-24 10:24:22 +00:00
parent a976f9bd00
commit bac86d9bb2
4 changed files with 81 additions and 20 deletions

View file

@ -2,9 +2,9 @@
* *
* $RCSfile: unoidx.hxx,v $ * $RCSfile: unoidx.hxx,v $
* *
* $Revision: 1.5 $ * $Revision: 1.6 $
* *
* last change: $Author: os $ $Date: 2000-12-09 14:04:51 $ * last change: $Author: tl $ $Date: 2002-06-24 11:24:22 $
* *
* 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
@ -203,6 +203,9 @@ class SwXDocumentIndexMark : public cppu::WeakImplHelper4
String sAltText; String sAltText;
String sPrimaryKey; String sPrimaryKey;
String sSecondaryKey; String sSecondaryKey;
String sTextReading;
String sPrimaryKeyReading;
String sSecondaryKeyReading;
String sUserIndexName; String sUserIndexName;
void InitMap(TOXTypes eToxType); void InitMap(TOXTypes eToxType);

View file

@ -2,9 +2,9 @@
* *
* $RCSfile: unoprnms.hxx,v $ * $RCSfile: unoprnms.hxx,v $
* *
* $Revision: 1.75 $ * $Revision: 1.76 $
* *
* last change: $Author: tl $ $Date: 2002-05-23 08:18:30 $ * last change: $Author: tl $ $Date: 2002-06-24 11:23:33 $
* *
* 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
@ -706,8 +706,11 @@ enum SwPropNameIds
/* 0626 */ UNO_NAME_DONT_BALANCE_TEXT_COLUMNS, /* 0626 */ UNO_NAME_DONT_BALANCE_TEXT_COLUMNS,
/* 0627 */ UNO_NAME_IS_CURRENTLY_VISIBLE, /* 0627 */ UNO_NAME_IS_CURRENTLY_VISIBLE,
/* 0628 */ UNO_NAME_ANCHOR_POSITION, /* 0628 */ UNO_NAME_ANCHOR_POSITION,
/* 0629 */ UNO_NAME_TEXT_READING,
/* 0630 */ UNO_NAME_PRIMARY_KEY_READING,
/* 0631 */ UNO_NAME_SECONDARY_KEY_READING,
/* 0629 */ SW_PROPNAME_END /* 0632 */ SW_PROPNAME_END
}; };

View file

@ -2,9 +2,9 @@
* *
* $RCSfile: unoidx.cxx,v $ * $RCSfile: unoidx.cxx,v $
* *
* $Revision: 1.44 $ * $Revision: 1.45 $
* *
* last change: $Author: jp $ $Date: 2002-02-05 14:57:52 $ * last change: $Author: tl $ $Date: 2002-06-24 11:22:42 $
* *
* 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
@ -1320,11 +1320,12 @@ sal_Int64 SAL_CALL SwXDocumentIndexMark::getSomething( const uno::Sequence< sal_
} }
TYPEINIT1(SwXDocumentIndexMark, SwClient) TYPEINIT1(SwXDocumentIndexMark, SwClient)
const sal_Char cBaseMark[] = "com.sun.star.text.BaseIndexMark"; const sal_Char cBaseMark[] = "com.sun.star.text.BaseIndexMark";
const sal_Char cContentMark[] = "com.sun.star.text.ContentIndexMark"; const sal_Char cContentMark[] = "com.sun.star.text.ContentIndexMark";
const sal_Char cIdxMark[] = "com.sun.star.text.DocumentIndexMark"; const sal_Char cIdxMark[] = "com.sun.star.text.DocumentIndexMark";
const sal_Char cUserMark[] = "com.sun.star.text.UserIndexMark"; const sal_Char cIdxMarkAsian[] = "com.sun.star.text.DocumentIndexMarkAsian";
const sal_Char cTextContent[] = "com.sun.star.text.TextContent"; const sal_Char cUserMark[] = "com.sun.star.text.UserIndexMark";
const sal_Char cTextContent[] = "com.sun.star.text.TextContent";
/* -----------------------------06.04.00 15:07-------------------------------- /* -----------------------------06.04.00 15:07--------------------------------
---------------------------------------------------------------------------*/ ---------------------------------------------------------------------------*/
@ -1341,22 +1342,31 @@ BOOL SwXDocumentIndexMark::supportsService(const OUString& rServiceName) throw(
!rServiceName.compareToAscii(cTextContent) || !rServiceName.compareToAscii(cTextContent) ||
(eType == TOX_USER && !rServiceName.compareToAscii(cUserMark)) || (eType == TOX_USER && !rServiceName.compareToAscii(cUserMark)) ||
(eType == TOX_CONTENT && !rServiceName.compareToAscii(cContentMark)) || (eType == TOX_CONTENT && !rServiceName.compareToAscii(cContentMark)) ||
(eType == TOX_INDEX && !rServiceName.compareToAscii(cIdxMark)); (eType == TOX_INDEX && !rServiceName.compareToAscii(cIdxMark)) ||
(eType == TOX_INDEX && !rServiceName.compareToAscii(cIdxMarkAsian));
} }
/* -----------------------------06.04.00 15:07-------------------------------- /* -----------------------------06.04.00 15:07--------------------------------
---------------------------------------------------------------------------*/ ---------------------------------------------------------------------------*/
Sequence< OUString > SwXDocumentIndexMark::getSupportedServiceNames(void) throw( RuntimeException ) Sequence< OUString > SwXDocumentIndexMark::getSupportedServiceNames(void) throw( RuntimeException )
{ {
Sequence< OUString > aRet(3); INT32 nCnt = (eType == TOX_INDEX) ? 4 : 3;
Sequence< OUString > aRet(nCnt);
OUString* pArray = aRet.getArray(); OUString* pArray = aRet.getArray();
pArray[0] = C2U(cBaseMark); pArray[0] = C2U(cBaseMark);
pArray[1] = C2U(cTextContent); pArray[1] = C2U(cTextContent);
switch(eType) switch(eType)
{ {
case TOX_USER: pArray[2] = C2U(cUserMark); break; case TOX_USER:
case TOX_CONTENT: pArray[2] = C2U(cContentMark);break; pArray[2] = C2U(cUserMark);
case TOX_INDEX: pArray[2] = C2U(cIdxMark);break; break;
case TOX_CONTENT:
pArray[2] = C2U(cContentMark);
break;
case TOX_INDEX:
pArray[2] = C2U(cIdxMark);
pArray[3] = C2U(cIdxMarkAsian);
break;
} }
return aRet; return aRet;
} }
@ -1567,6 +1577,12 @@ void SwXDocumentIndexMark::attachToRange(const Reference< text::XTextRange > & x
aMark.SetPrimaryKey(sPrimaryKey); aMark.SetPrimaryKey(sPrimaryKey);
if(sSecondaryKey.Len()) if(sSecondaryKey.Len())
aMark.SetSecondaryKey(sSecondaryKey); aMark.SetSecondaryKey(sSecondaryKey);
if(sTextReading.Len())
aMark.SetTextReading(sTextReading);
if(sPrimaryKeyReading.Len())
aMark.SetPrimaryKeyReading(sPrimaryKeyReading);
if(sSecondaryKeyReading.Len())
aMark.SetSecondaryKeyReading(sSecondaryKeyReading);
break; break;
case TOX_USER: case TOX_USER:
case TOX_CONTENT: case TOX_CONTENT:
@ -1740,6 +1756,15 @@ void SwXDocumentIndexMark::setPropertyValue(const OUString& rPropertyName,
case WID_MAIN_ENTRY: case WID_MAIN_ENTRY:
aMark.SetMainEntry(lcl_AnyToBool(aValue)); aMark.SetMainEntry(lcl_AnyToBool(aValue));
break; break;
case WID_TEXT_READING:
aMark.SetTextReading(lcl_AnyToString(aValue));
break;
case WID_PRIMARY_KEY_READING:
aMark.SetPrimaryKeyReading(lcl_AnyToString(aValue));
break;
case WID_SECONDARY_KEY_READING:
aMark.SetSecondaryKeyReading(lcl_AnyToString(aValue));
break;
} }
SwTxtTOXMark* pTxtMark = pCurMark->GetTxtTOXMark(); SwTxtTOXMark* pTxtMark = pCurMark->GetTxtTOXMark();
@ -1807,6 +1832,15 @@ void SwXDocumentIndexMark::setPropertyValue(const OUString& rPropertyName,
case WID_SECONDARY_KEY: case WID_SECONDARY_KEY:
sSecondaryKey = lcl_AnyToString(aValue); sSecondaryKey = lcl_AnyToString(aValue);
break; break;
case WID_TEXT_READING:
sTextReading = lcl_AnyToString(aValue);
break;
case WID_PRIMARY_KEY_READING:
sPrimaryKeyReading = lcl_AnyToString(aValue);
break;
case WID_SECONDARY_KEY_READING:
sSecondaryKeyReading = lcl_AnyToString(aValue);
break;
case WID_USER_IDX_NAME : case WID_USER_IDX_NAME :
{ {
OUString sTmp(lcl_AnyToString(aValue)); OUString sTmp(lcl_AnyToString(aValue));
@ -1857,6 +1891,15 @@ uno::Any SwXDocumentIndexMark::getPropertyValue(const OUString& rPropertyName)
case WID_SECONDARY_KEY: case WID_SECONDARY_KEY:
aRet <<= OUString(pCurMark->GetSecondaryKey()); aRet <<= OUString(pCurMark->GetSecondaryKey());
break; break;
case WID_TEXT_READING:
aRet <<= OUString(pCurMark->GetTextReading());
break;
case WID_PRIMARY_KEY_READING:
aRet <<= OUString(pCurMark->GetPrimaryKeyReading());
break;
case WID_SECONDARY_KEY_READING:
aRet <<= OUString(pCurMark->GetSecondaryKeyReading());
break;
case WID_USER_IDX_NAME : case WID_USER_IDX_NAME :
{ {
OUString sTmp(pType->GetTypeName()); OUString sTmp(pType->GetTypeName());
@ -1889,6 +1932,15 @@ uno::Any SwXDocumentIndexMark::getPropertyValue(const OUString& rPropertyName)
case WID_SECONDARY_KEY: case WID_SECONDARY_KEY:
aRet <<= OUString(sSecondaryKey); aRet <<= OUString(sSecondaryKey);
break; break;
case WID_TEXT_READING:
aRet <<= OUString(sTextReading);
break;
case WID_PRIMARY_KEY_READING:
aRet <<= OUString(sPrimaryKeyReading);
break;
case WID_SECONDARY_KEY_READING:
aRet <<= OUString(sSecondaryKeyReading);
break;
case WID_USER_IDX_NAME : case WID_USER_IDX_NAME :
aRet <<= OUString(sUserIndexName); aRet <<= OUString(sUserIndexName);
break; break;

View file

@ -2,9 +2,9 @@
* *
* $RCSfile: unoprnms.cxx,v $ * $RCSfile: unoprnms.cxx,v $
* *
* $Revision: 1.77 $ * $Revision: 1.78 $
* *
* last change: $Author: tl $ $Date: 2002-05-23 08:21:52 $ * last change: $Author: tl $ $Date: 2002-06-24 11:23:09 $
* *
* 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
@ -707,7 +707,10 @@ const SwPropNameTab aPropNameTab = {
/* 0625 UNO_NAME_SNAP_TO_GRID */ {MAP_CHAR_LEN("SnapToGrid")}, /* 0625 UNO_NAME_SNAP_TO_GRID */ {MAP_CHAR_LEN("SnapToGrid")},
/* 0626 UNO_NAME_DONT_BALANCE_TEXT_COLUMNS */{MAP_CHAR_LEN("DontBalanceTextColumns")}, /* 0626 UNO_NAME_DONT_BALANCE_TEXT_COLUMNS */{MAP_CHAR_LEN("DontBalanceTextColumns")},
/* 0627 UNO_NAME_IS_CURRENTLY_VISIBLE */{MAP_CHAR_LEN("IsCurrentlyVisible")}, /* 0627 UNO_NAME_IS_CURRENTLY_VISIBLE */{MAP_CHAR_LEN("IsCurrentlyVisible")},
/* 0628 UNO_NAME_ANCHOR_POSITION */ {MAP_CHAR_LEN("AnchorPosition")} /* 0628 UNO_NAME_ANCHOR_POSITION */ {MAP_CHAR_LEN("AnchorPosition")},
/* 0629 UNO_NAME_TEXT_READING */ {MAP_CHAR_LEN("TextReading")},
/* 0630 UNO_NAME_PRIMARY_KEY_READING */ {MAP_CHAR_LEN("PrimaryKeyReading")},
/* 0631 UNO_NAME_SECONDARY_KEY_READING */ {MAP_CHAR_LEN("SecondaryKeyReading")}
}; };
#ifndef PRODUCT #ifndef PRODUCT