diff options
author | Oliver Specht <os@openoffice.org> | 2002-10-30 09:41:06 +0000 |
---|---|---|
committer | Oliver Specht <os@openoffice.org> | 2002-10-30 09:41:06 +0000 |
commit | 4c22da9b8685c321a3dd1bd6962135129ceaa099 (patch) | |
tree | c094bca8a55f77950c24c2b1fd4c9a1e1e3cd89c /sw/source/ui | |
parent | 18960b061f01c0d0e21685023a4f8da02857be7d (diff) |
#98749# enable 'no brackets' in bibliography fields
Diffstat (limited to 'sw/source/ui')
-rw-r--r-- | sw/source/ui/index/cnttab.cxx | 23 | ||||
-rw-r--r-- | sw/source/ui/index/cnttab.hrc | 5 | ||||
-rw-r--r-- | sw/source/ui/index/cnttab.src | 11 | ||||
-rw-r--r-- | sw/source/ui/index/toxmgr.cxx | 36 |
4 files changed, 46 insertions, 29 deletions
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index fcfbe507de67..1ba409e00b80 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -2,9 +2,9 @@ * * $RCSfile: cnttab.cxx,v $ * - * $Revision: 1.48 $ + * $Revision: 1.49 $ * - * last change: $Author: os $ $Date: 2002-10-25 10:06:11 $ + * last change: $Author: os $ $Date: 2002-10-30 10:41:05 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -460,8 +460,11 @@ SwMultiTOXTabDialog::SwMultiTOXTabDialog(Window* pParent, const SfxItemSet& rSet rSh.GetFldType(RES_AUTHORITY, aEmptyStr); if(pFType) { - String sBrackets(pFType->GetPrefix()); - sBrackets += pFType->GetSuffix(); + String sBrackets; + if(pFType->GetPrefix()) + sBrackets += pFType->GetPrefix(); + if(pFType->GetSuffix()) + sBrackets += pFType->GetSuffix(); pDescArr[nArrayIndex]->SetAuthBrackets(sBrackets); pDescArr[nArrayIndex]->SetAuthSequence(pFType->IsSequence()); } @@ -1101,6 +1104,7 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(Window* pParent, const SfxItemSet& rAttrS bFirstCall(sal_True), pIndexRes(0) { + aBracketLB.InsertEntry(String(ResId(ST_NO_BRACKET)), 0); FreeResource(); pIndexEntryWrapper = new IndexEntrySupplierWrapper(); @@ -1349,7 +1353,11 @@ void SwTOXSelectTabPage::ApplyTOXDescription() } else if(TOX_AUTHORITIES == aCurType.eType) { - aBracketLB.SelectEntry(rDesc.GetAuthBrackets()); + String sBrackets(rDesc.GetAuthBrackets()); + if(!sBrackets.Len() || sBrackets.EqualsAscii(" ")) + aBracketLB.SelectEntryPos(0); + else + aBracketLB.SelectEntry(sBrackets); aSequenceCB.Check(rDesc.IsAuthSequence()); } aAutoMarkPB.Enable(aFromFileCB.IsChecked()); @@ -1449,7 +1457,10 @@ void SwTOXSelectTabPage::FillTOXDescription() break; case TOX_AUTHORITIES: { - rDesc.SetAuthBrackets(aBracketLB.GetSelectEntry()); + if(aBracketLB.GetSelectEntryPos()) + rDesc.SetAuthBrackets(aBracketLB.GetSelectEntry()); + else + rDesc.SetAuthBrackets(aEmptyStr); rDesc.SetAuthSequence(aSequenceCB.IsChecked()); } break; diff --git a/sw/source/ui/index/cnttab.hrc b/sw/source/ui/index/cnttab.hrc index a83c478c123d..2cd82cb257d5 100644 --- a/sw/source/ui/index/cnttab.hrc +++ b/sw/source/ui/index/cnttab.hrc @@ -2,9 +2,9 @@ * * $RCSfile: cnttab.hrc,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: oj $ $Date: 2002-08-06 12:40:33 $ + * last change: $Author: os $ $Date: 2002-10-30 10:41:06 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -258,6 +258,7 @@ #define LB_SORTALG 148 #define IMG_SORTUP_HC 149 #define IMG_SORTDOWN_HC 150 +#define ST_NO_BRACKET 151 #define TO_CONTENT 1 #define TO_INDEX 2 #define TO_ILLUSTRATION 4 diff --git a/sw/source/ui/index/cnttab.src b/sw/source/ui/index/cnttab.src index c16c12176482..7098389fbc1a 100644 --- a/sw/source/ui/index/cnttab.src +++ b/sw/source/ui/index/cnttab.src @@ -2,9 +2,9 @@ * * $RCSfile: cnttab.src,v $ * - * $Revision: 1.58 $ + * $Revision: 1.59 $ * - * last change: $Author: os $ $Date: 2002-09-06 13:48:54 $ + * last change: $Author: os $ $Date: 2002-10-30 10:41:06 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -2256,7 +2256,7 @@ TabPage TP_TOX_SELECT ListBox LB_BRACKET { Pos = MAP_APPFONT ( 75, 84) ; - Size = MAP_APPFONT ( 20, 50 ) ; + Size = MAP_APPFONT ( 40, 50 ) ; Border = TRUE; DropDown = TRUE; StringList = @@ -2267,6 +2267,11 @@ TabPage TP_TOX_SELECT < "<>" ;> ; }; }; + String ST_NO_BRACKET + { + Text = "[keine]" ; + Text [ ENGLISH ] = "[none]" ; + }; FixedLine FL_AUTHORITY { Pos = MAP_APPFONT ( 6 , 59) ; diff --git a/sw/source/ui/index/toxmgr.cxx b/sw/source/ui/index/toxmgr.cxx index 50bd488211d4..2d5a53dca3c6 100644 --- a/sw/source/ui/index/toxmgr.cxx +++ b/sw/source/ui/index/toxmgr.cxx @@ -2,9 +2,9 @@ * * $RCSfile: toxmgr.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: iha $ $Date: 2002-08-08 13:13:02 $ + * last change: $Author: os $ $Date: 2002-10-30 10:41:06 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -441,22 +441,22 @@ BOOL SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc, { SwAuthorityFieldType* pFType = (SwAuthorityFieldType*) pSh->GetFldType(RES_AUTHORITY, aEmptyStr); - if(pFType) - { - pFType->SetPreSuffix(rDesc.GetAuthBrackets().GetChar(0), - rDesc.GetAuthBrackets().GetChar(1)); - pFType->SetSequence(rDesc.IsAuthSequence()); - SwTOXSortKey rArr[3]; - rArr[0] = rDesc.GetSortKey1(); - rArr[1] = rDesc.GetSortKey2(); - rArr[2] = rDesc.GetSortKey3(); - pFType->SetSortKeys(3, rArr); - pFType->SetSortByDocument(rDesc.IsSortByDocument()); - pFType->SetLanguage(rDesc.GetLanguage()); - pFType->SetSortAlgorithm(rDesc.GetSortAlgorithm()); - - pFType->UpdateFlds(); - } + if(!pFType) + pFType = (SwAuthorityFieldType*)pSh->InsertFldType( + SwAuthorityFieldType(pSh->GetDoc())); + pFType->SetPreSuffix(rDesc.GetAuthBrackets().GetChar(0), + rDesc.GetAuthBrackets().GetChar(1)); + pFType->SetSequence(rDesc.IsAuthSequence()); + SwTOXSortKey rArr[3]; + rArr[0] = rDesc.GetSortKey1(); + rArr[1] = rDesc.GetSortKey2(); + rArr[2] = rDesc.GetSortKey3(); + pFType->SetSortKeys(3, rArr); + pFType->SetSortByDocument(rDesc.IsSortByDocument()); + pFType->SetLanguage(rDesc.GetLanguage()); + pFType->SetSortAlgorithm(rDesc.GetSortAlgorithm()); + + pFType->UpdateFlds(); } // TODO: consider properties of the current TOXType if(!pCurTOX || (ppBase && !(*ppBase))) |